请看看这个CxxxApp::OnFileNew何时被触发?

lihj 2002-03-11 05:36:09
生成一个默认属性的MDI程序,编译通过执行时自动打开一个新文档。从源码分析,好象只有从菜单发出消息,才能动态生成一个frame、document、view。我想知道在程序初次执行时,这个消息是如何被触发的。谢谢。
...全文
74 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
lihj 2002-03-12
  • 打赏
  • 举报
回复
明白了,谢谢
cppnet 2002-03-11
  • 打赏
  • 举报
回复
如果这样就不会自动打开一个文档了:
BOOL C**App::InitInstance() 中:
////////////
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
cmdInfo.m_nShellCommand =CCommandLineInfo::FileNothing;
// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;
////////////
prometheusphinx 2002-03-11
  • 打赏
  • 举报
回复
在它前面加一句就不会有了。
cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;
cppnet 2002-03-11
  • 打赏
  • 举报
回复
在程序的初始化中的 CCommandLineInfo 中指定的.
prometheusphinx 2002-03-11
  • 打赏
  • 举报
回复
if (!ProcessShellCommand(cmdInfo))

1,662

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 非技术类
社区管理员
  • 非技术类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧