在CWinApp的派生类中如下代码CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;

解决方案 »

  1.   

    1. app初始化里:
    cmdInfo.m_nShellCommand = CCommandLineInfo.FileNothing;
    2。把pMainFrame->ShowWindow(m_nCmdShow);
    改为;
    pMainFrame->ShowWindow(SW_SHOWMAXIMIZED);
      

  2.   

    在CWinApp的派生类的InitInstance中添加如下代码:CCommandLineInfo cmdInfo;
    ParseCommandLine(cmdInfo);
    cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing; // 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(SW_SHOWMAXIMIZED);
    pMainFrame->UpdateWindow();
      

  3.   

    一个简单方法,保证管用.BOOL CMarkupApp::InitInstance()
    {
        .....
        .....
    /*把下面这段代码注销
    if (!ProcessShellCommand(cmdInfo))
    return FALSE;
    */
        ....
    }
      

  4.   

    shawn_liu() 非常感谢,一会就给分 yu_hl(卖火柴的小男孩) 
    我指的是多文档里面的怎样最大化
      

  5.   

    pMainFrame->ShowWindow(SW_SHOWMAXIMIZED);
    把整个程序最大化了我想把打开的文档最大化
    我在OnCreate里面加了ShowWindow(SW_SHOWMAXIMIZED);只把标题栏都弄没了
    却没有在CChildFrame里面最大化。是不是因为我用了CBCGMDIChildWnd的原因呢?
      

  6.   

    在MDI子框架类中如下,即CMDIChildWnd的派生类void CChildFrame::ActivateFrame(int nCmdShow)
    {
    // TODO: Modify this function to change how the frame is activated. nCmdShow = SW_SHOWMAXIMIZED;
    CMDIChildWnd::ActivateFrame(nCmdShow);
    }
      

  7.   


    cmdInfo.m_nShellCommand = CCommandLineInfo.FileNothing;
    把pMainFrame->ShowWindow(m_nCmdShow);
    pMainFrame->ShowWindow(SW_SHOWMAXIMIZED);
      

  8.   

    APP初始化里:
    cmdInfo.m_nShellCommand = CCommandLineInfo.FileNothing;
    把pMainFrame->ShowWindow(m_nCmdShow);
    pMainFrame->ShowWindow(SW_SHOWMAXIMIZED);