1、模态对话框
CTipDlg tipDlg;
INT_PTR nResponse = tipDlg.DoModal();
if(nResponse == IDCANCEL)
{
return;
}
UpdateData(TRUE);
m_editsum = m_editAddend+m_editSummand;
UpdateData(FALSE);
2、非模态对话框
#include "TipDlg.h"
CTipDlg *m_pTipDlg;
m_pTipDlg = new CTipDlg();
m_pTipDlg->Create(IDD_TIP_DIALOG,this);
m_pTipDlg->ShowWindow(SW_SHOW);