... a few months later ...
Lots more stuff in this program now. But there's something that's got me mystified: a hotkey that doesn't work.
I've put in a bunch of hotkeys that do work: Ctrl-O for open, Ctrl-S for save, Ctrl-P for print, etc.
But I just added a feature that lets you view "extra" files in a separate window, handy for looking at other source files. It works from the menu, AND the hotkey works BUT ONLY IF the cursor is over some non-client part of the window, like the title bar: it never works if the cursor is in the edit window. The other ones work no matter where the cursor is.
Here's my hotkey structure:
;***** Keyboard accelerators: *****
KBaccelerators LABEL DWORD
ACCEL <FCONTROL or FVIRTKEY, 'N', $menuNewFile>
ACCEL <FCONTROL or FVIRTKEY, 'O', $menuOpenFile>
ACCEL <FCONTROL or FVIRTKEY, 'S', $menuSaveFile>
ACCEL <FCONTROL or FVIRTKEY, 'P', $menuPrint>
ACCEL <FCONTROL or FVIRTKEY, 'F', $menuFindText>
ACCEL <FCONTROL or FVIRTKEY, 'R', $menuReplaceText>
ACCEL <FCONTROL or FVIRTKEY, 'T', $menuViewExtraFile>
ACCEL <FVIRTKEY, VK_F3, $menuFindAgain>
$numKBaccels EQU ($ - KBaccelerators) / SIZEOF ACCEL
Like I say, they ALL work, EXCEPT the "$menuViewExtraFile" one, and I just can't figure out why.
I've tried every letter in the alphabet, of course avoiding the ones that are used by RichEdit (
this page of José Roca's was helpful in finding all the RichEdit shortcut keys). Makes no difference what letter I use, it just doesn't trigger a response.
It's not a big deal, but it's quite annoying. I guess I'll just put another button on the menu bar or something ...