Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 167733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:19:40+00:00 2026-05-11T12:19:40+00:00

How could I prevent esc from closing a dialog box? I searched for this

  • 0

How could I prevent esc from closing a dialog box?

I searched for this topic, but all I found was for MFC (You can overwrite PreTranslateMessage function in MFC). but my program is written in Windows API, not MFC.

I tried to catch all Keyboard messages in Dialog procedure, but none of them works. I also tried using subclassing in dialog box, but it didn’t work too.

How could I do that? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T12:19:41+00:00Added an answer on May 11, 2026 at 12:19 pm

    You can determine whether it’s from the system menu easily enough — check out the ‘return value’ section of this MSDN page to see how.

    If you can’t determine whether it’s from the ESCAPE key or a button, you could always get around that by using a different identifier for your Cancel button.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Click here to see what I mean.. What could prevent these two from sitting
I am wondering if a conditional operator could actually prevent other unrelated code from
Does anyone have any ideas on how you could prevent a user from posting
What could prevent me from linking with a third-party .lib built with Visual Studio
In the CE based Windows Mobile you could prevent the screen back-light from timing
I was wondering how I could prevent an object from being visible when dragged
Could anyone tell me if SQL Server 2008 has a way to prevent keywords
Could someone please tell me why this <%= destroy_password_url @user.password_reset_token %> generates http://localhost:3000/api/destroy_password.4G5EoRVYMUAtiIKqOerKsw routes.rb
Could this be done with javascript/jQuery : <div class=number>99,123,123</div> <div class=number>123,123,123</div> <div class=number>1,123,123,123</div> <div
Could someone please suggest why this is happening... I’ve got some code to pretty

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.