Esc Key, not always close the dialog...
Hi,
I have a dialog and I want that before close one window with the "Esc" Key, ask to save some datas, and if the save operation fails, not to close the window.
Is there an easy way to do this ?, I have thinked about in pretranslate message get the message for ESC_KEY ( what message is ?), and then ask, and if it fails, get out the message.
Anybody can help me ? Thanks, Bye !
Braulio
Re: Esc Key, not always close the dialog...
If you have IDCANCEL button in your dialog then just add event handler BTN_CLICKED for that control.
And if you don't just add member function
virtual void OnCancel();
to your dialog class.