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

📄 subject_28554.htm

📁 一些关于vc的问答
💻 HTM
字号:
<p>
序号:28554 发表者:阿平 发表日期:2003-01-22 11:31:43
<br>主题:怎样让程序启动的时候不要显示界面
<br>内容:我想让程序启动的时候不要显示界面。<BR>就象是AntiVirus在计算机启动的时候并有什么界面出来,只是在托盘里加入一个图标。<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>
回复者:upstream 回复日期:2003-01-22 11:41:07
<br>内容:这需要进行拖盘编程。<BR>我传个例子给你,然后在给你讲解。<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>回复者:PLB 回复日期:2003-01-22 11:56:40
<br>内容:Initialize()中把那个ShowWindow()去掉
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:阿平 回复日期:2003-01-22 12:57:33
<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>
回复者:菜鸟也支招儿 回复日期:2003-01-22 15:35:30
<br>内容:简单!我建立了一个基于对话框的叫haha的程序,找到下面的函数(在haha(工程名).cpp文件里找)<BR>BOOL CHahaApp::InitInstance()<BR>{<BR>&nbsp;&nbsp;&nbsp;&nbsp;AfxEnableControlContainer();<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;// Standard initialization<BR>&nbsp;&nbsp;&nbsp;&nbsp;// If you are not using these features and wish to reduce the size<BR>&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;of your final executable, you should remove from the following<BR>&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;the specific initialization routines you do not need.<BR><BR>#ifdef _AFXDLL<BR>&nbsp;&nbsp;&nbsp;&nbsp;Enable3dControls();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Call this when using MFC in a shared DLL<BR>#else<BR>&nbsp;&nbsp;&nbsp;&nbsp;Enable3dControlsStatic();&nbsp;&nbsp;&nbsp;&nbsp;// Call this when linking to MFC statically<BR>#endif<BR><BR>/*&nbsp;&nbsp;&nbsp;&nbsp;CHaha3Dlg dlg;//////////把这一段注释掉,在运行你的代码就不会有界面产生了!<BR>&nbsp;&nbsp;&nbsp;&nbsp;m_pMainWnd = &amp;dlg;<BR>&nbsp;&nbsp;&nbsp;&nbsp;int nResponse = dlg.DoModal();<BR>&nbsp;&nbsp;&nbsp;&nbsp;if (nResponse == IDOK)<BR>&nbsp;&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// TODO: Place code here to handle when the dialog is<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;dismissed with OK<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;&nbsp;else if (nResponse == IDCANCEL)<BR>&nbsp;&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// TODO: Place code here to handle when the dialog is<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;dismissed with Cancel<BR>&nbsp;&nbsp;&nbsp;&nbsp;}*/把这一段注释掉,在运行你的代码就不会有界面产生了!<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;// Since the dialog has been closed, return FALSE so that we exit the<BR>&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;application, rather than start the application's message pump.<BR>&nbsp;&nbsp;&nbsp;&nbsp;return FALSE;<BR>}<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>
回复者:easunlee 回复日期:2003-02-12 21:09:34
<br>内容:菜鸟也支招儿 :<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;那你要再显示怎么办?
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:张佗辉 回复日期:2003-02-13 10:29:32
<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>
回复者:jz 回复日期:2003-02-25 22:07:17
<br>内容:coolcoolfoot<BR>你的程序在运行吗?<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>
回复者:rancle 回复日期:2003-02-26 15:19:10
<br>内容:呵呵,你可以这样做!<BR>在InitInstance()中将主窗口先隐藏ShowWindow(SW_HIDE),<BR>然后在需要显示的时候再显示出来ShowWindow(SW_SHOW),这部操作可放在托盘程序中实现!<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>
回复者:夏天和小凡 回复日期:2003-08-21 10:49:08
<br>内容:我最后回答一下,只要把程序做成一个服务程序就可以了!<BR>我在学习,也不断成长,差不一个月后,我发现我学的东西太少太少,就象是我提的这个问题<BR>现在看是多么幼稚多谢大家的帮助!
<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 + -