16,473
社区成员
发帖
与我相关
我的任务
分享
BOOL CDlgBig::OnInitDialog()
{
CDialog::OnInitDialog();
...
m_pDlgSmall = new CDlgSmall;
m_pDlgSmall->Create(IDD_SMALL, this);
m_pDlgSmall->ShowWindow(SW_SHOW);
return TRUE;
}
void CDlgSmall::OnCancel()
{
CDlgBig * pBigDlg = (CDlgBig*)GetParent();
pBigDlg->DestoryBackWnd();//调用OnOk()销毁父窗口 即模态对话框
DestroyWindow();
}
void CDlgSmall::PostNcDestroy()
{
CDialog::PostNcDestroy();
delete this;
}