How exactly is a keyboard shortcut for a menu handled. For instance Ctrl+O for open. Do I just check for the ctrl key when I get a WM_KEYUP/KEYDOWN or is there a special way to handle it?
:)
Printable View
How exactly is a keyboard shortcut for a menu handled. For instance Ctrl+O for open. Do I just check for the ctrl key when I get a WM_KEYUP/KEYDOWN or is there a special way to handle it?
:)
You create an accelerator table resource. You load it with LoadAccelerators and then extend the message loop to include
if(!TranslateAccelerator(...)) {
// TranslateMessage and DispatchMessage here
}
The actions are then sent to you as WM_COMMAND messages.
Thanks
:)