📄 subject_15631.htm
字号:
<p>
序号:15631 发表者:lhbnj 发表日期:2002-09-19 23:44:01
<br>主题:能否定义一个对话框类可以调用多个对话框窗口?
<br>内容:能否定义一个对话框类,只要指定不同的对话框ID,可以调用不同的对话框窗口?<BR>当然,这些对话框中的控件ID是重复的!
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:小戟 回复日期:2002-09-20 08:23:42
<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>
回复者:lhbnj 回复日期:2002-09-20 09:20:54
<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>回复者:Aikoc 回复日期:2002-09-20 17:06:45
<br>内容:BOOL CMEDesktopApp::InitInstance()<BR>{<BR> AfxEnableControlContainer();<BR><BR> // Standard initialization<BR> // If you are not using these features and wish to reduce the size<BR> // of your final executable, you should remove from the following<BR> // the specific initialization routines you do not need.<BR><BR>#ifdef _AFXDLL<BR> Enable3dControls(); // Call this when using MFC in a shared DLL<BR>#else<BR> Enable3dControlsStatic(); // Call this when linking to MFC statically<BR>#endif<BR><BR> UINT nIDD = IDD_MEDESKTOP_DIALOG;<BR> int nHeight = GetSystemMetrics(SM_CXMAXIMIZED);<BR> // 1024*768<BR> if(nHeight > 900)<BR> {<BR> nIDD = IDD_MEDESKTOP_DIALOG;<BR> }<BR> // 800*600<BR> else if(nHeight > 700)<BR> {<BR> nIDD = IDD_MEDESKTOP_DIALOG_800;<BR> }<BR> // 640*480<BR> else<BR> {<BR> nIDD = IDD_MEDESKTOP_DIALOG_600;<BR> }<BR> CMEDesktopDlg dlg(NULL,nIDD);<BR> m_pMainWnd = &dlg;<BR> int nResponse = dlg.DoModal();<BR> if (nResponse == IDOK)<BR> {<BR> // TODO: Place code here to handle when the dialog is<BR> // dismissed with OK<BR> }<BR> else if (nResponse == IDCANCEL)<BR> {<BR> // TODO: Place code here to handle when the dialog is<BR> // dismissed with Cancel<BR> }<BR><BR> // Since the dialog has been closed, return FALSE so that we exit the<BR> // application, rather than start the application's message pump.<BR> return FALSE;<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 + -