OnKeyDown not getting called in a dialog-based app?
From: me (me_at_here.com)
Date: 01/15/05
- Next message: Dan Bloomquist: "Re: Keystroke problem with an MFC application."
- Previous message: me: "Re: scroll-wheel problems with an owner-draw ListBox"
- Next in thread: Dan Bloomquist: "Re: OnKeyDown not getting called in a dialog-based app?"
- Reply: Dan Bloomquist: "Re: OnKeyDown not getting called in a dialog-based app?"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 15 Jan 2005 18:24:08 +0000 (UTC)
I'm writing a dialog-based app with quite a few different controls and
gadets on the main page.
I want to catch the "DEL" key so i can implement a delete function on
selected items so I added a message handler to the main dialog frame to
catch the WM_KEYDOWN message but it never gets called - i've checked the
message map and everything seems to be in order. What am I missing?
I've also got another smaller problem with keyboard input because the
application will quit if ENTER or ESC is pressed (a bit harsh for my
purposes). I stopped it quitting on ENTER by commenting out the code in the
default OnOK function and I can stop it quitting on ESC by commenting out
the code in OnCancel but then the application doesn't quit when the "Close"
icon is clicked at the top right of the window - what do i need to do here?
Regards,
Karl.
- Next message: Dan Bloomquist: "Re: Keystroke problem with an MFC application."
- Previous message: me: "Re: scroll-wheel problems with an owner-draw ListBox"
- Next in thread: Dan Bloomquist: "Re: OnKeyDown not getting called in a dialog-based app?"
- Reply: Dan Bloomquist: "Re: OnKeyDown not getting called in a dialog-based app?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|