Share via


CWinApp::m_nCmdShow

Remarks

Corresponds to the nCmdShow parameter passed by Windows to WinMain. You should pass m_nCmdShow as an argument when you call CWnd::ShowWindow for your application’s main window. m_nCmdShow is a public variable of type int.

Example

BOOL CMyApp::InitInstance()
{
   // ...

   // Create main MDI Frame window.
   CMainFrame* pMainFrame = new CMainFrame;
   if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
      return FALSE;
   // Save the pointer to the main frame window.  This is the
   // only way the framework will have knowledge of what the
   // main frame window is.
   m_pMainWnd = pMainFrame;

   // Show the   main window using the nCmdShow parameter
   // passed to the application when it was first launched.
   pMainFrame->ShowWindow(m_nCmdShow);
   pMainFrame->UpdateWindow();

   // ...
}

CWinApp OverviewClass MembersHierarchy Chart