// App类的InitInstance函数中,将原来的代码替换为下面的代码即可,对话框风格保持和原来一样,任务栏上也不会显示该对话框的按钮。
// CXXDlg dlg;
// m_pMainWnd = &dlg;
// int nResponse = dlg.DoModal();
// if (nResponse == IDOK)
// {
// // TODO: Place code here to handle when the dialog is
// // dismissed with OK
// }
// else if (nResponse == IDCANCEL)
// {
// // TODO: Place code here to handle when the dialog is
// // dismissed with Cancel
// }
CFrameWnd* pFrame = new CFrameWnd;
ASSERT(NULL != pFrame);
m_pMainWnd = pFrame;
// create and load the frame with its resources
VERIFY(pFrame->Create(NULL, NULL));
// The one and only window has been initialized, so show and update it.
CXXDlg dlg;
dlg.DoModal();
delete pFrame;
pFrame = NULL;
// 下面这个需要注意一下:
// 在对话框类的OnInitDialog函数中return返回之前加上这句:
ModifyStyleEx(WS_EX_APPWINDOW, 0); // 去掉窗口的WS_EX_APPWINDOW风格即可