pMainFrame->ShowWindow(m_nCmdShow);       //m_nCmdShow//SW_SHOWMAXIMIZED在向导生成的多文档代码中,将以上的m_nCmdShow(SW_SHOWNORMAL)参数改为SW_SHOWMAXIMIZED后,程序加载过程中不执行OnShowWindow函数,怎么会这样?

解决方案 »

  1.   

    SW_SHOWMAXIMIZED
    Activates the window and displays it as a maximized window.
    SW_SHOWNORMAL
    Activates and displays a window. If the window is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when displaying the window for the first time.
      

  2.   

    我也来贴一个,说明楼主的问题: The WM_SHOWWINDOW message is not sent under the following circumstances: 
    When a top-level, overlapped window is created with the WS_MAXIMIZE or WS_MINIMIZE style. 
    When the SW_SHOWNORMAL flag is specified in the call to the ShowWindow function.