窗口按钮不出现任务栏上,并且窗口风格保持原来的样式

// 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; m_pMainWnd = pFrame; // create and load the frame with its resources pFrame->Create(NULL, NULL); // The one and only window has been initialized, so show and update it. CXXDlg dlg; dlg.DoModal(); // 下面这个需要注意一下: // 在对话框类的OnInitDialog函数中return返回之前加上这句: ModifyStyleEx(WS_EX_APPWINDOW, 0); // 去掉窗口的WS_EX_APPWINDOW风格即可

你可能感兴趣的:(null,dialog,任务)