MFC在关闭第二个窗口时关闭主对话框

AfxGetApp()->m_pMainWnd->SendMessage(WM_CLOSE);//关闭主对话框

原文地址:https://www.cnblogs.com/xuandi/p/5362483.html