Sign in to follow this  

Dialogs: Catching Esc and __only__ Esc [MFC]

This topic is 4750 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

This topic is 4750 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this