⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subject_54343.htm

📁 vc
💻 HTM
字号:
<p>
序号:54343 发表者:xiaobo 发表日期:2003-09-27 14:42:36
<br>主题:关于m_pMainWnd
<br>内容:我先生成一个single document,文件名xx,然后在源码xx.cpp中<BR>看到了这么两句<BR>//&nbsp;&nbsp;m_pMainWnd-&gt;ShowWindow(SW_SHOW);<BR>//&nbsp;&nbsp;m_pMainWnd-&gt;UpdateWindow();<BR>我把这两句删掉了运行程序,程序照样没错,且窗口照样显示<BR>和删掉前一样<BR>这两句话不是显示和更新窗口的吗?怎么没用? 
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:xiaobo 回复日期:2003-09-27 15:30:04
<br>内容:怎么没人理?问题是不是很白痴?
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:魔王 回复日期:2003-09-27 17:28:58
<br>内容:因为你的是文档/视图结构,在程序运行<BR>&nbsp;&nbsp;m_pMainWnd-&gt;ShowWindow(SW_SHOW);<BR>&nbsp;&nbsp;m_pMainWnd-&gt;UpdateWindow();<BR>之前,程序发送了NewFile的消息创建了文档,创建文档是发送了显示窗口的信息,如过想不显示窗口,可以:<BR>//&nbsp;&nbsp;&nbsp;&nbsp;CCommandLineInfo cmdInfo;<BR>//&nbsp;&nbsp;&nbsp;&nbsp;ParseCommandLine(cmdInfo);<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;// Dispatch commands specified on the command line<BR>//&nbsp;&nbsp;&nbsp;&nbsp;if (!ProcessShellCommand(cmdInfo))<BR>//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return FALSE;<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;// The one and only window has been initialized, so show and update it.<BR>//&nbsp;&nbsp;&nbsp;&nbsp;m_pMainWnd-&gt;ShowWindow(SW_SHOW);<BR>//&nbsp;&nbsp;&nbsp;&nbsp;m_pMainWnd-&gt;UpdateWindow();<BR><BR>最好是:<BR><BR>CCommandLineInfo cmdInfo;<BR>ParseCommandLine(cmdInfo);<BR>cmdInfo.m_nShellCommand=CCommandLineInfo::FileNothing;//不自动创建文档<BR>&nbsp;&nbsp;&nbsp;&nbsp;// Dispatch commands specified on the command line<BR>if (!ProcessShellCommand(cmdInfo))<BR>return FALSE;<BR><BR>//&nbsp;&nbsp;&nbsp;&nbsp;m_pMainWnd-&gt;ShowWindow(SW_SHOW);<BR>//&nbsp;&nbsp;&nbsp;&nbsp;m_pMainWnd-&gt;UpdateWindow();
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:xiaobo 回复日期:2003-09-27 19:51:24
<br>内容:xiexie<BR>我还是似懂非懂,只好好好的研究xx.cpp文件了,CWinApp::InitInstance()才几句话就搞死我了
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -