在child函数里加一个BOOL m_bFirstOpen;在childframe的构造函数里使其为true;
重载OnFileNew函数
if(m_bFirstOpen)
   {
    m_bFirstOpen=FALSE;
    return true;
   }

解决方案 »

  1.   

    在App的InitInstance函数里面找下面这一段:
    // Parse command line for standard shell commands, DDE, file open
    CCommandLineInfo cmdInfo;
    ParseCommandLine(cmdInfo);
    在它后面加入:
    if(cmdInfo.m_nShellCommand == CCommandLineInfo::FileNew){
      cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;
    }
    就行了,来自《vc++内幕》
      

  2.   

     这是最恰当的方法:(在命令行中找出自动的 FileNew, 干掉它)
    在:YourApp类的InitInstance函数中ParseCommandLine(cmdInfo)语句之后加入以下代码:
     if(cmdInfo.m_nShellCommand==CCommandLineInfo::FileNew)
    {
       cmdInfo.m_nShellCommand=CCommandLineInfo:;FileNothing;
    }
    如果还不行, mailto:[email protected]   
      

  3.   

     //
    //if (!ProcessShellCommand(cmdInfo))  
    // return FALSE;    if(cmdInfo.m_nShellCommand == CCommandLineInfo::FileNew)
        {
          cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;
        }