If the specified window is a parent or owner window, DestroyWindow automatically destroys the associated child or owned windows when it destroys the parent or owner window. The function first destroys child or owned windows, and then it destroys the parent or owner window.
执行DestroyWindow()时,会调用PostNcDestroy()函数。
我把
delete m_dlg1;
delete m_dlg2;
去除,在child子对话框中加入解析函数
~ChildDlg()
{
delete this;
}
就不在出现错误了,这是什么原因
delete m_dlg1;
delete m_dlg2;
去除,在child子对话框中加入了解析函数
~ChildDlg()
{
delete this;
}
就不会出现销毁对话框报错问题了,这是什么原因?
执行的时候一直错误是0x内存不能读。
而后面加入的
~ChildDlg()
{
delete this;
}
会被执行到。
delete m_dlg1;
delete m_dlg2;
”
试试。