Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
CWinApp::m_nCmdShow
Collapse the table of content
Expand the table of content

CWinApp::m_nCmdShow

Corresponds to the nCmdShow parameter passed by Windows to WinMain.

int m_nCmdShow;

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.

   // The following code fragment is taken from CMyApp::InitInstance. 
   // CMyApp is derived from CWinApp. 

	// The main window has been initialized, so show and update it 
   // using the nCmdShow parameter passed to the application when it 
   // was first launched. 
   // pMainFrame is the main MDI frame window of our app and is derived  
   // from CMDIFrameWnd.
	pMainFrame->ShowWindow(m_nCmdShow);
	pMainFrame->UpdateWindow();

Header: afxwin.h

Show:
© 2015 Microsoft