Vcl.Menus.TMenu.ProcessMenuChar
Delphi
procedure ProcessMenuChar(var Message: TWMMenuChar);
C++
void __fastcall ProcessMenuChar(Winapi::Messages::TWMMenuChar &Message);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | Vcl.Menus.pas Vcl.Menus.hpp |
Vcl.Menus | TMenu |
Description
Responds to keyboard input for the menu.
ProcessMenuChar handles keyboard messages from Windows. It checks whether the character typed is an accelerator character from one of the menu's items. If so, ProcessMenuChar executes the menu item (or, if the item is disabled, selects it). If the key is not an accelerator, ProcessMenuChar checks for captions that begin with the character. If there is only one, it is treated like an accelerator. Otherwise, the first item beginning with that character is selected.
When calling ProcessMenuChar programmatically, the User, MenuFlag, and Menu fields of Message parameter must be supplied.