0

How can i prevent a dialog closing by Alt+F4 ?
I am using PreTranslateMessage(),,,,what is the Virtual key #define for Alt+F4 or is there any other way?,,,,thank you

7
Contributors
8
Replies
10
Views
8 Years
Discussion Span
Last Post by mitrmkar
0

It's a combination of the F4 key code combined with the alt modifiers, you need to check both.

But i'd avoid trying to prevent it if I was you....

0

Seems pretty simple to me, add this to the dialog message procedure, and windows shouldn't handle the ALT-F4.

case WM_SYSKEYDOWN: break;

Hmm .. that renders the system menu completely ineffective, which is probably not what the OP wants.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.