OnKeyDown not getting called in a dialog-based app?

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: me (me_at_here.com)
Date: 01/15/05


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.
 



Relevant Pages

  • Re: OnKeyDown not getting called in a dialog-based app?
    ... > selected items so I added a message handler to the main dialog frame to ... 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 ...
    (microsoft.public.vc.mfc)
  • Re: OnKeyDown not getting called in a dialog-based app?
    ... Thanks Dan, that works great - dunno why it didn't work before or why ... >> the default OnOK function and I can stop it quitting on ESC by commenting ...
    (microsoft.public.vc.mfc)
  • Re: 5 Days Done
    ... NRT is a really, really valuable quit aid for many, many people. ... phenomenon I have never encountered in all my years at as3), ... When you start out with quitting, you feel like all your "meter money" is ...
    (alt.support.stop-smoking)
  • Re: 5 Days Done
    ...  NRT is a really, really valuable quit aid for many, many people. ... NRT saves lives. ... phenomenon I have never encountered in all my years at as3), ... When you start out with quitting, you feel like all your "meter money" is ...
    (alt.support.stop-smoking)
  • Re: Eight years
    ... It is exactly how I feel about quitting and Lord knows I ... EVERYTHING I KNOW ABOUT QUITTING SMOKING ... Use all the quit aids you can, ... So now I've convinced you to use NRT and all the quit aids you can ...
    (alt.support.stop-smoking)