TWMMenuChar represents a Windows Keystroke message directed at a menu.
TWMMenuChar = packed record Msg: Cardinal; User: Char; MenuFlag: Word; Menu: HMENU; Result: Longint; end;
struct TWMMenuChar { unsigned Msg; Char User; Word MenuFlag; HMENU Menu; Longint Result; };
TWMMenuChar is the data structure used for all Windows keyboard messages that are sent to menu items. The Msg field is the Windows message code. The User field specifies the virtual key code for the key pressed by the user. This is either a character or a virtual key constant, such as VK_CANCEL. The Unused field is ignored. The MenuFlag field indicates the type of menu to which the message is directed. It should always be MF_POPUP, indicating a drop-down menu, submenu, or shortcut menu. (Earlier versions of Windows also supported MF_SYSMENU for the system menu, but the use of this flag is obsolete). The Menu field is the handle of the menu to which the message is directed. The Result field holds the value returned by the application processing the message. The following table lists the possible values and their meaning.
Value |
Meaning |
MNC_IGNORE |
Tells Windows to discard the character the user pressed and create a short beep on the system speaker. |
MNC_CLOSE |
Tells Windows to close the active menu. |
MNC_EXECUTE |
Combined with an index in the low-order word, tells Windows to choose the item specified by that index. The owner window receives a WM_COMMAND message. |
MNC_SELECT |
Combined with an index in the low-order word, tells Windows to select the item specified by that index. |
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|