RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMenu.ProcessMenuChar Method

Responds to keyboard input for the menu.

Pascal
procedure ProcessMenuChar(var Message: TWMMenuChar);
C++
__fastcall ProcessMenuChar(TWMMenuChar Message);

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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!