Jump to content
  • Advertisement
Sign in to follow this  
Red Ant

Dialogs: Catching Esc and __only__ Esc [MFC]

This topic is 5058 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, I'm close to despair. Been trying to find a workaround to disable CDialog's default behavior when the user presses the <Esc> button (namely closing the Dialog). I've read about a dozen threads where users asked the same question and usually they were told to just override CDialog::OnCancel() and do nothing in the reimplemented version. HOWEVER, this does not work in my case since I still want to allow the user to close the app using the little cross in the upper right hand corner (or the file->exit menu). So basically I just need to filter out the <Esc> key press event and stop it from getting processed by the application, but I don't know where. Anyone know a solution?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!