Xeon,

Looking at your code, you might want to change:
Code:
void CMyDialog::PostNcDestroy() 
{	
	CDialog::PostNcDestroy();

	CManyDlgsDlg* pDlg = (CManyDlgsDlg*)AfxGetMainWnd();
	CMyDialog* pDlg2 = pDlg->m_arDlgs.GetAt(m_nIndex);

	delete pDlg2;
}
to
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);
}
Regards,
John Flegert