Page 1 of 1

[MFC] Cum pornesc o aplicatie SDI/MDI ascunsa?

Posted: 21 Apr 2011, 15:25
by Ovidiu Cucu
Q: Cum pornesc o aplicatie SDI/MDI ascunsa?

A: Cel mai simplu, in InitInstance atribui valoarea SW_HIDE membrului CWinApp::m_nCmdShow.

Code: Select all

BOOL CMyApp::InitInstance()
{
// ...
   m_nCmdShow = SW_HIDE; // <-- add this!
   // Dispatch commands specified on the command line
   if (!ProcessShellCommand(cmdInfo))
      return FALSE;

   // The main window has been initialized, so show and update it.
   pMainFrame->ShowWindow(m_nCmdShow);
   pMainFrame->UpdateWindow();

   return TRUE;
}
<< Back to MFC index