分享

怎样让多文档程序在启动时不打开一个空文档

 liyanweicc 2011-08-08
BOOL   CMyWinApp::InitInstance()
{
...
//   Parse   command   line   for   standard   shell   commands,   DDE,   file   open.
      CCommandLineInfo   cmdInfo;
      ParseCommandLine(cmdInfo);
//   Do   not   display   a   new   MDI   child   window   during   startup.
      cmdInfo.m_nShellCommand   =   CCommandLineInfo::FileNothing;
//   Dispatch   commands   specified   on   the   command   line.
      if   (!ProcessShellCommand(cmdInfo))
            return   FALSE;
...
};

为了去掉开始的子窗口,可在应用程序文件
分析命令行的语句

  CCommandLineInfo   cmdInfo;

  ParseCommandLine(cmdInfo);

  后加入:

  cmdInfo.m_nShellCommand=CCommandLineInfo::FileNothing;

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多