问题如标题。就这么多分了,请高手不吝赐教。

解决方案 »

  1.   

    在初始化中BOOL CDocumentApp::InitInstance()
    对cmdInfo.m_strDriverName赋初值
      

  2.   

    在// Parse command line for standard shell commands, DDE, file open
    CCommandLineInfo cmdInfo;
    ParseCommandLine(cmdInfo);后面添加
    cmdInfo.m_strFileName="F:\\VCCode\\document\\Docume1.txt";
      

  3.   

    不行啊。.m_strFileName参数没有错
      

  4.   

    cmdInfo.m_nShellCommand=CCommandLineInfo::FileOpen;
      

  5.   

    BOOL CMyWinApp::InitInstance()
    {
    ......
    // Parse command line for standard shell commands, DDE, file open
    CCommandLineInfo cmdInfo;
    ParseCommandLine(cmdInfo);
    cmdInfo.m_strFileName="C:\\Documents and Settings\\abc.txt";
    cmdInfo.m_nShellCommand=CCommandLineInfo::FileOpen;......
    //
    }
    //可参看Msdn 中CCommandLineInfo 类的相关