Preventing dialogs being closed by ESC
Intercept the WM_CLOSE message and return 0, the add a custom button with a non-general ID and allow that to close the dialog. Or you could do some extra testing in the WM_CLOSE handler to see if it was esc that was pressed and forces the dialog to close.
If you''re using MFC, try overriding the virtual OnCancel() member function of CDialog.
--------------------
You are not a real programmer until you end all your sentences with semicolons; (c) 2000 ROAD Programming
You are unique. Just like everybody else.
"Mechanical engineers design weapons; civil engineers design targets."
"Sensitivity is adjustable, so you can set it to detect elephants and other small creatures." -- Product Description for a vibration sensor
--------------------
You are not a real programmer until you end all your sentences with semicolons; (c) 2000 ROAD Programming
You are unique. Just like everybody else.
"Mechanical engineers design weapons; civil engineers design targets."
"Sensitivity is adjustable, so you can set it to detect elephants and other small creatures." -- Product Description for a vibration sensor
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement