RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMenu.IsShortCut Method

Dispatches a key message if it represents a shortcut key for an item in the menu.

Pascal
function IsShortCut(var Message: TWMKey): Boolean; dynamic;
C++
__fastcall Boolean IsShortCut(TWMKey Message);

Call IsShortCut when processing a KeyDown message to identify shortcut keys and trigger the appropriate menu action. IsShortCut decodes the key message passed in the Message parameter. It then encodes the state of the Shift, Control, and Alt keys with the value of the character that was typed to obtain the ShortCut property of a menu item. If IsShortCut locates a menu item associated with the shortcut key combination, it calls the item's Click method and returns true. If no item in the menu has a shortcut corresponding to the message, IsShortCut returns false. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!