在CMainFrame中添加ActivateFrame函数,修改nCmdShow

void CMainFrame::ActivateFrame(int nCmdShow)
{
// TODO: Add your specialized code here and/or call the base class
nCmdShow = SW_HIDE;
CFrameWnd::ActivateFrame(nCmdShow);
}

然后在主程的InitInstance函数中把SW_SHOW改成SW_HIDE就行了,如没上一步,单纯做此步是不行的

BOOL CTest2App::InitInstance()
{
m_pMainWnd->ShowWindow(SW_HIDE);
}

相关文章:

  • 2022-02-18
  • 2022-02-03
  • 2021-10-11
  • 2021-08-06
  • 2022-12-23
  • 2021-06-01
  • 2021-11-04
猜你喜欢
  • 2021-09-09
  • 2022-12-23
  • 2022-12-23
  • 2021-05-20
  • 2022-01-12
  • 2021-08-07
  • 2022-12-23
相关资源
相似解决方案