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

📄 subject_61764.htm

📁 vc
💻 HTM
字号:
<p>
序号:61764 发表者:sank 发表日期:2003-11-21 16:26:50
<br>主题:有有关对话框的问题
<br>内容:我的程序里有两个对话框,如何让程序开始时显示第二个对话框而不显示第一个??<BR>在MFC中好像默认显示的是第一个,不显示第二个的把?
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:张庆芳 回复日期:2003-11-21 20:59:02
<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>
回复者:sank 回复日期:2003-11-21 21:40:07
<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-11-21 22:46:46
<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>回复者:hurtmanzc 回复日期:2003-11-22 21:50:51
<br>内容:看看下面这个函数你就明白了:<BR><BR>BOOL CYourApp::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;CYourDlg dlg;<BR>&nbsp;&nbsp;&nbsp;&nbsp;m_pMainWnd = &amp;dlg;<BR>&nbsp;&nbsp;&nbsp;&nbsp;int nResponse = dlg.DoModal();//显示CYourDlg对话框<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>
回复者:菜鸟人飞 回复日期:2003-11-22 22:30:21
<br>内容:谢谢hurtmanzc,非常感谢!
<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 + -