🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #72

Accelerator keys and EnableKbdHandler

#72
From: Hunting the Snark
Date: Mon, 27 Jul 1992 06:22
26 lines
1839 bytes
I asked this question a couple months ago and got no response, so excuse me for
being a pest, I'll try to ask it a little differently this time.

I am writing an application that consists of a single window composed of many
child windows. I have enabled the KbdHandler in order to TAB between the childs
as in a dialog box. I intercept WM_KEYUP messages to process the arrow keys, 
Spacebar, Enter, and the numeric keypad. Everything works fine except that the 
numeric keypad causes Windows to beep; otherwise the key functions as it should
though.

Now, in addition to the above, I'm trying to add accelerator keys to my menu
items. I've defined various CNTRL+<letter> combinations in an accelerator table
and assigned them the same constants as the menu commands. The table gets
loaded but any attempt to use one just beeps with no other response at all.

I've been told that Dialogs cannot have menus and therefore no accelerators.
Presumably, the method that EnableKbdHandler activates can only deal with the
dialog style keys and doesn't know what to do with the rest of the keyboard
and hence the beeps. But the NUMPADx keys seem to still get passed on anyway,
so why not the CNTRL+<letter> keys?

If anyone out there can make sense of what I've just asked could you please
help. I'm using TPW+OWL if that makes any difference.

Sm
Technical Details
Message-ID: <1992Jul27.054413.26297@engage.pko.dec.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!decwrl!pa.dec.com!nntpd2.cxo.dec.com!nntpd.lkg.dec.com!engage.pko.dec.com!tfh.enet.dec.com!marshall

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.ms.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!decwrl!pa.dec.com!nntpd2.cxo.dec.com!nntpd.lkg.dec.com!engage.pko.dec.com!tfh.enet.dec.com!marshall
From: marshall@tfh.enet.dec.com (Hunting the Snark)
Subject: Accelerator keys and EnableKbdHandler
Message-ID: <1992Jul27.054413.26297@engage.pko.dec.com>
Sender: newsdaemon@engage.pko.dec.com (USENET News Daemon)
Organization: Digital Equipment Corporation
Date: Mon, 27 Jul 1992 06:22:51 GMT
Lines: 28