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

Despre MFC, ATL si alte biblioteci C++ de la Microsoft (forum moderat)
Post Reply
User avatar
Ovidiu Cucu
Fondator
Fondator
Posts: 3778
Joined: 11 Jul 2007, 16:10
Judet: Iaşi
Location: Iasi
Contact:

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

Post by Ovidiu Cucu » 21 Apr 2011, 15:25

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



Post Reply