mapgis67二次开发学习笔记

mapgis67二次开发学习笔记

ID:39156501

大小:20.02 KB

页数:4页

时间:2019-06-25

mapgis67二次开发学习笔记_第1页
mapgis67二次开发学习笔记_第2页
mapgis67二次开发学习笔记_第3页
mapgis67二次开发学习笔记_第4页
资源描述:

《mapgis67二次开发学习笔记》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、MAPGIS67二次开发学习笔记1.问题:文件-新建工程,文件-打开工程,实现代码处于DOC下,只是调用了VC的函数OnFileNew()和OnFileOpen(),如何实现打开mapgis工程的呢?答案:实现这个的具体操作在stringtable里面,只需修改参数即可,函数的话用VC的API函数即可。2.问题:如何控制一步一步打开程序界面。答案:主资源文件CPP,初始化组件库,初始化登录对话框,创建模板,add模板,创建窗口,ShowWindow,UpDateWindow。BOOLCFireMapApp::

2、InitInstance(){if(CoInitialize(NULL)!=0){AfxMessageBox("初始化COM支持库失败!");exit(1);}dengludeng;deng.DoModal();//CLogo*dlg=newCLogo();//dlg->Create(IDD_LOGO);//dlg->ShowWindow(SW_SHOW);//dlg->UpdateWindow();//Sleep(2000);AfxEnableControlContainer();//Standardini

3、tialization//Ifyouarenotusingthesefeaturesandwishtoreducethesize//ofyourfinalexecutable,youshouldremovefromthefollowing//thespecificinitializationroutinesyoudonotneed.#ifdef_AFXDLLEnable3dControls();//CallthiswhenusingMFCinasharedDLL#elseEnable3dControlsSta

4、tic();//CallthiswhenlinkingtoMFCstatically#endif//Changetheregistrykeyunderwhichoursettingsarestored.//TODO:Youshouldmodifythisstringtobesomethingappropriate//suchasthenameofyourcompanyororganization.SetRegistryKey(_T("LocalAppWizard-GeneratedApplications")

5、);LoadStdProfileSettings(6);//LoadstandardINIfileoptions(includingMRU)//Registertheapplication'sdocumenttemplates.Documenttemplates//serveastheconnectionbetweendocuments,framewindowsandviews.m_pPrjEditTemplate=newCMultiDocTemplate(IDR_MENU_MAPGIS,RUNTIME_CL

6、ASS(CFireMapDoc),RUNTIME_CLASS(CChildFrame),//customMDIchildframeRUNTIME_CLASS(CFireMapView));AddDocTemplate(m_pPrjEditTemplate);//createmainMDIFramewindowCMainFrame*pMainFrame=newCMainFrame;if(!pMainFrame->LoadFrame(IDR_MAINFRAME))returnFALSE;m_pMainWnd=pM

7、ainFrame;//Parsecommandlineforstandardshellcommands,DDE,fileopenCCommandLineInfocmdInfo;ParseCommandLine(cmdInfo);if(cmdInfo.m_strFileName.IsEmpty())cmdInfo.m_nShellCommand=CCommandLineInfo::FileNothing;elsecmdInfo.m_nShellCommand=CCommandLineInfo::FileOpen

8、;//Dispatchcommandsspecifiedonthecommandlineif(!ProcessShellCommand(cmdInfo))returnFALSE;//Themainwindowhasbeeninitialized,soshowandupdateit.pMainFrame->ShowWindow(SW_SHOWMAXIMIZED);pMainFrame->UpdateW

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。