16,472
社区成员
发帖
与我相关
我的任务
分享
CNewDlg dlg1;
dlg1.DoModal();
CGSDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
BOOL CMyDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CXXXDlg dlg;
if (IDCANCEL == dlg.Domodal())
{
EndDialog(IDCANCEL);
}
m_nVal = dlg.m_nVal;
//.......................
return TRUE; // return TRUE unless you set the focus to a control
}