Xeon,
Looking at your code, you might want to change:
toCode:void CMyDialog::PostNcDestroy() { CDialog::PostNcDestroy(); CManyDlgsDlg* pDlg = (CManyDlgsDlg*)AfxGetMainWnd(); CMyDialog* pDlg2 = pDlg->m_arDlgs.GetAt(m_nIndex); delete pDlg2; }
Regards,Code:void CMyDialog::PostNcDestroy() { CDialog::PostNcDestroy(); CManyDlgsDlg* pDlg = (CManyDlgsDlg*)AfxGetMainWnd(); CMyDialog* pDlg2 = pDlg->m_arDlgs.GetAt(m_nIndex); delete pDlg2; pDlg->m_arDlgs.SetAt(m_nIndex, NULL); }
John Flegert




Reply With Quote