From: Leon W. <moo...@us...> - 2005-01-27 13:50:54
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11086 Modified Files: SAPrefsDialog.cpp SAPrefsSubDlg.cpp Log Message: Enabled the possibility to cancel the Preferences dialog by pressing Escape. Index: SAPrefsSubDlg.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SAPrefsSubDlg.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SAPrefsSubDlg.cpp 9 Sep 2004 18:54:48 -0000 1.5 --- SAPrefsSubDlg.cpp 27 Jan 2005 13:50:44 -0000 1.6 *************** *** 82,86 **** if ((pMsg->message == WM_KEYDOWN) && (pMsg->wParam == VK_ESCAPE)) { ! return TRUE; } --- 82,90 ---- if ((pMsg->message == WM_KEYDOWN) && (pMsg->wParam == VK_ESCAPE)) { ! // Normally escape would close the dialog, but we don't ! // want the child dialog to close, so we we return FALSE ! // and let the parent dialog handle escape. Which causes ! // it to close. ! return FALSE; } Index: SAPrefsDialog.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/SAPrefsDialog.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** SAPrefsDialog.cpp 25 Sep 2004 13:10:08 -0000 1.22 --- SAPrefsDialog.cpp 27 Jan 2005 13:50:44 -0000 1.23 *************** *** 131,140 **** ASSERT(m_hWnd != NULL); - // Don't let CDialog process the Escape key. - if ((pMsg->message == WM_KEYDOWN) && (pMsg->wParam == VK_ESCAPE)) - { - return TRUE; - } - if (CWnd::PreTranslateMessage(pMsg)) return TRUE; --- 131,134 ---- |