EnableMenuItem
The EnableMenuItem function enables, disables, or grays the given menu item.
BOOL EnableMenuItem(
HMENU hMenu, // handle of menu
UINT uIDEnableItem, // menu item to enable, disable, or gray
UINT uEnable // menu item flags
);
Returns
The return value specifies the previous state of the menu item (it is either
MF_DISABLED, MF_ENABLED, or MF_GRAYED). If the menu item does not exist, the return
value is 0xFFFFFFFF.
|
EnableWindow
The EnableWindow function enables or disables mouse and keyboard input to the specified
window or control. When input is disabled, the window does not receive input such as
mouse clicks and key presses. When input is enabled, the window receives all input.
BOOL EnableWindow(
HWND hWnd, // handle of window
BOOL bEnable // flag for enabling or disabling input
);
Returns
If the window was previously disabled, the return value is TRUE; otherwise, the return
value is FALSE. To get extended error information, call GetLastError.
|
|