隱藏MFC對話框程序主窗口:
1.不在桌面任務(wù)欄顯示
ModifyStyleEx(WS_EX_APPWINDOW, WS_EX_TOOLWINDOW);
2.使用SetPos設(shè)置0
::SetWindowPos(m_hWnd, NULL, 0, 0, 0, 0, 0);
關(guān)閉主窗口對話框:
CDialog* pDlg =reinterpret_cast<CDialog*>(AfxGetApp()->GetMainWnd());
pDlg->EndDialog(IDOK);