HOWTO: Detect Keystrokes While a Menu Is Pulled Down |
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
SUMMARY
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.
Additional query words:
Keywords : kbHook kbOSWinNT kbOSWin2000 kbGrpDSUser kbOSWin
Issue type : kbhowto
Technology : kbWin32SDKSearch kbAudDeveloper kbWin3xSearch kbSDKSearch kbWin32sSearch kbWinSDKSearch kbWinSDK300 kbWinSDK310
Last Reviewed: July 12, 2000 |