📄 subject_28446.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> 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> // Change the registry key under which our settings are stored.<BR> // TODO: You should modify this string to be something appropriate<BR> // such as the name of your company or organization.<BR> SetRegistryKey(_T("Local AppWizard-Generated Applications"));<BR><BR> LoadStdProfileSettings(); // Load standard INI file options (including MRU)<BR><BR> // Register the application's document templates. Document templates<BR> // serve as the connection between documents, frame windows and views.<BR><BR> CYourDlg dlg;//////////在这里调用,进行你所需要的操作<BR> if(IDCANCLE==dlg.DoModal())<BR> return FALSE;<BR><BR>////退出后,再显示视图窗口<BR><BR> CSingleDocTemplate* pDocTemplate;<BR> pDocTemplate = new CSingleDocTemplate(<BR> IDR_MAINFRAME,<BR> RUNTIME_CLASS(CTestBMPDoc),<BR> RUNTIME_CLASS(CMainFrame), // 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 + -