节点文献

多视图类多文档模板在VC++中的实现

Realization of Multiple View Class and Multiple Document Template

  • 推荐 CAJ下载
  • PDF下载
  • 不支持迅雷等下载工具,请取消加速工具后下载。

【作者】 孙祥娥刘益成

【Author】 Sun Xiange; and Liu Yicheng

【机构】 江汉石油学院电子与信息工程系!荆州434102

【摘要】 详细讨论在VisualC++5.0中实现同一应用程序的多个视图类和实现多个文档模板的方法,以及如何改变窗口缺省属性的方法。实现多个视图类的关键问题:一是新加入的视图类必须以CView做为类名的结尾;二是要建立新的视困类和文档类之间的联系,在新加入的视图类中加入GetDocument函数,使该函数返回一个指向派生的文档类的指针,并在新的视图类中加入GetDocument函数的调试和非调试版本。多个文楷模板建立之后,需要加入适当的函数和菜单命令,以便去掉随着新的空文档的打开而出现的模板列表框,为此需要删除应用程序类中InitInstance函数里用于打开空文档的命令处理行,并添加相应的消息处理函数和辅助函数,以便根据确定的文档类型打开相应的空文裆。

【Abstract】 This Paper discusses the realizing methed of multiple view class and multiple document templates under C++ 5. O environment and how to whify the default property of windows. There are two key steps of realising multiple view class.The first one is that Cview must be at end of the name of new adding view class and the second one is to set up the relation between new view class and derived docurnent class. A Getboument function is defined and it is made retUm to thederived document class in a new adding view class. Its debug and non-debug edihons are added in the new adding viewclass. After the Multiple document temPlate is set up, a proper function and a menu conunand are addd to canel thetemplate list hax aPPearing with opening new empty document. Then, the pmeessing command in IniTnstance function ofapplication prograxn class should be deleted. According to the detendned temPlate tyPe, the messag pmeessing command and adrilimp functions should be added to the opened empty docurnent.

  • 【文献出处】 石油仪器 ,PETROLEUM INSTRUMENTS , 编辑部邮箱 ,2000年02期
  • 【分类号】TP311
  • 【被引频次】1
  • 【下载频次】135
节点文献中: 

本文链接的文献网络图示:

本文的引文网络