m_pMainWnd->EnableWindow(TRUE);
m_pMainWnd->SetForegroundWindow(); //将主窗口置顶
this->EnableWindow(FALSE);//模态对话框失效
this->ShowWindow(SW_HIDE); //隐藏模态对话框
...
//恢复模态对话框显示
m_pMainWnd->EnableWindow(FALSE);
this->EnableWindow(TRUE);
this->ShowWindow(SW_SHOW);
MFC 隐藏模态对话框并将焦点交给其他窗口
于 2022-05-09 17:25:27 首次发布