正在加载图片...
VC++ Programming UESTC Chapter 7 The modeless dialog and Windows Common Dialogs In CExO7aDialog h #define WM goodbye WM user+5 In ICEx07aDialog cpp void CEXO7aDialog: OnCancel0 / not really a message handler( if (m pView !=NULL)(//modeless case m pView->PostMessage(WM GOODBYE, IDCANCED) else(CDialog: On Cancel0; //modal) void CEX07aDialog: OnoKo / not really a message handler( if (m pView ! =NULL)(//modeless case UpdateData(TRUE) m pView->PostMessage(WM GOODBYE, IDOK) else(CDialog: OnOKo; //modal caseVC++ Programming @ UESTC 6 ⚫ In CEx07aDialog.h #define WM_GOODBYE WM_USER+5 ⚫ In ICEx07aDialog.cpp void CEx07aDialog::OnCancel() // not really a message handler{ if (m_pView != NULL) {// modeless case m_pView->PostMessage(WM_GOODBYE, IDCANCEL);} else {CDialog::OnCancel(); // modal} } void CEx07aDialog::OnOK() // not really a message handler{ if (m_pView != NULL) {// modeless case UpdateData(TRUE); m_pView->PostMessage(WM_GOODBYE, IDOK);} else {CDialog::OnOK(); // modal case} } Chapter 7 The Modeless Dialog and Windows Common Dialogs
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有