void CEx07aDialog::OnCancel() // not really a message handler
{
if (m_pView != NULL) {
// modeless case -- do not call base class OnCancel
m_pView->PostMessage(WM_GOODBYE, IDCANCEL);
}
else {
CDialog::OnCancel(); // modal case
}
}
void CEx07aDialog::OnOK() // not really a message handler
{
if (m_pView != NULL) {
// modeless case -- do not call base class OnOK
UpdateData(TRUE);
m_pView->PostMessage(WM_GOODBYE, IDOK);
}
else {
CDialog::OnOK(); // modal case
}
}