TE Edit Control Win32 / Win64 Help
Product page

TerMenuEnable

Get menu item 'enable' status

UINT TerMenuEnable(hWnd, MenuId)
BOOL TerMenuEnable2(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 enabled or grayed.

Return Value: The TerMenuEnable function returns one of the following constants:

MF_ENABLED = Enable menu item

MF_GRAYED = Gray out the menu item

The TerMenuEnable2 function returns TRUE when a menu item is enabled. Otherwise it returns a FALSE value.

Example:

#include "ter_dlg.h"

BOOL status;

status = TerMenuEnable2(hWnd,ID_CUT);

// The 'status' variable will be TRUE if a text block is highlighted to be copied to the clipboard.