HOWTO: Detect Keystrokes While a Menu Is Pulled Down
ID: Q35930
|
The information in this article applies to:
-
Microsoft Win32 Software Development Kit (SDK)
-
Microsoft Windows Software Development Kit (SDK) versions 3.0, 3.1
In the Windows environment, there are two methods that an application
can use to receive notification that a key is pressed while a menu is
dropped down:
- The easier method is to process the WM_MENUCHAR message that is sent
to an application when the user presses a key that does not correspond
to any of the accelerator keys defined for the current menu.
- The other method is to use a message filter hook or a keyboard hook
specified with the SetWindowsHook function. The hook function can
process a message before it is dispatched to a dialog box, message box,
or menu.
Keywords : kbHook kbNTOS kbGrpUser kbWinOS
Version :
Platform :
Issue type : kbhowto
Last Reviewed: March 5, 1999