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

📄 subject_28446.htm

📁 一些关于vc的问答
💻 HTM
字号:
<p>
序号:28446 发表者:song403 发表日期:2003-01-21 14:35:01
<br>主题:Help
<br>内容:我想编一个程序,要求一一个对话框开始。在输入一些选项后,打开一个文档/视结构的程序。请问如何进行。
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:upstream 回复日期:2003-01-21 14:51:43
<br>内容:1.首先生成一个一个文档/视结构的程序,SDI或者MDI,根据自己的需要<BR>2.把对话框的代码放在InitInstance()中,并在视图窗口显示以前调用,<BR><BR>BOOL CTestBMPApp::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;// Change the registry key under which our settings are stored.<BR>&nbsp;&nbsp;&nbsp;&nbsp;// TODO: You should modify this string to be something appropriate<BR>&nbsp;&nbsp;&nbsp;&nbsp;// such as the name of your company or organization.<BR>&nbsp;&nbsp;&nbsp;&nbsp;SetRegistryKey(_T("Local AppWizard-Generated Applications"));<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;LoadStdProfileSettings();&nbsp;&nbsp;// Load standard INI file options (including MRU)<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;// Register the application's document templates.&nbsp;&nbsp;Document templates<BR>&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;serve as the connection between documents, frame windows and views.<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;CYourDlg dlg;//////////在这里调用,进行你所需要的操作<BR>&nbsp;&nbsp;&nbsp;&nbsp;if(IDCANCLE==dlg.DoModal())<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return FALSE;<BR><BR>////退出后,再显示视图窗口<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;CSingleDocTemplate* pDocTemplate;<BR>&nbsp;&nbsp;&nbsp;&nbsp;pDocTemplate = new CSingleDocTemplate(<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IDR_MAINFRAME,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RUNTIME_CLASS(CTestBMPDoc),<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RUNTIME_CLASS(CMainFrame),&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // main
<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 + -