0
点赞
收藏
分享

微信扫一扫

解决 Warning: calling DestroyWindow in CWnd::~CWnd OnDestroy or PostNcDestroy in derived class will no

//在另一个窗口中创建时

CTestDlg *pDlg = new CTestDlg();

pDlg->Create(IDD_DIALOG_TEST,this);
pDlg->ShowWindow(TREU): 

在自己类中销毁

void CTestDlg::OnNcDestroy()
 {
    DestroyWindow();
     CDialogEx::OnNcDestroy();
 }

 void CTestDlg::PostNcDestroy()
 {
     CDialogEx::PostNcDestroy();
     delete this;
 }

举报

相关推荐

0 条评论