How to Handle ESC button in PropertySheet?
Posted on 2001-07-16
In my application I have a modless PropertySheet with 3 PropertPages added to it.
In the ProprtySheet (not Property Page), I have added my own Close button which closes the dialog on clicking on it.
In the event handling of this Close button, I am calling :
CPropertysheet::OnClose() function, which closes the dialog. Also I am handling WM_CLOSE message.
In trying to solve the problem, I also tried handling WM_KEYDOWN, WM_SYSKEYDOWN and WM_DESTROY.
But when I press ESC from the keyboard, the PropertySheet
dialog does not close. Where as for ather dialogs it works fine even if WM_CLOSE is not handled.
How should the PropertySheet dialog automatically get closed when I press ESC button from the keyboard?