Fix for bug 7717: Cancel button should have confirm dialog (r=tao)

This commit is contained in:
shrutiv%netscape.com 2001-09-10 22:51:55 +00:00
parent 25f6374edd
commit a09e6024c8

View File

@ -60,7 +60,8 @@ BEGIN_MESSAGE_MAP(CPropSheet, CPropertySheet)
//{{AFX_MSG_MAP(CPropSheet)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
ON_BN_CLICKED(IDC_FEEDBACK_BUTTON, OnButtonCopy)
ON_BN_CLICKED(IDC_FEEDBACK_BUTTON, OnButtonCopy)
ON_BN_CLICKED(IDCANCEL, OnCancelButn)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
@ -107,3 +108,12 @@ void CPropSheet::OnButtonCopy()
theInterpreter->OpenBrowser((char*)(LPCTSTR)Feedback);
}
void CPropSheet::OnCancelButn()
{
if(::MessageBox(m_hWnd, "Are you sure you want to exit?",
"Confirmation", MB_YESNO | MB_DEFBUTTON2 | MB_ICONQUESTION) == IDNO)
return;
CPropSheet::EndDialog(IDCANCEL);
}