TerMenuSelect
Get menu item selection status
UINT TerMenuSelect(hWnd, MenuId)
BOOL TerMenuSelect2(hWnd, MenuId)
HWND hWnd; | Editor window to access |
int MenuId; | menu id can be any of the constants defined in the ter_cmd.h file. |
Description: If your program creates a menu outside the editor window, you can use this function to test if a menu item should be checked.
Return Value: The TerMenuSelect function returns one of the following constants:
MF_CHECKED = Check the menu item
MF_UNCHECKED = Uncheck the menu item
The TerMenuSelect2 function returns a TRUE value if a menu item is to be checked. Otherwise it returns a FALSE value.
Example:
#include "ter_dlg.h"
BOOL status;
status = TerMenuSelect2(hWnd,ID_BOLD_ON);
// The 'status' variable will be TRUE if the current character has the bold style.