次の方法で共有


CWinApp::m_nCmdShow

Windows WinMainにを渡す nCmdShow のパラメーターに対応します。

int m_nCmdShow;

解説

アプリケーションのメイン ウィンドウの CWnd::ShowWindow を呼び出すときに引数として m_nCmdShow を渡す必要があります。 m_nCmdShow は 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();

必要条件

ヘッダー: afxwin.h

参照

関連項目

CWinApp クラス

階層図