MFC视图类的继承、模板方法模式及其在数据库应用系统中的应用  

Derivation of MFC View Classes,Template Method Pattern, and their Employment in Database Application System

在线阅读下载全文

作  者:胡昌林[1] 魏保华[1] 李永军[1] 刘鹏远[1] 

机构地区:[1]石家庄军械工程学院导弹工程系,河北石家庄050003

出  处:《微计算机信息》2006年第09X期239-241,共3页Control & Automation

基  金:总装备部基金项目(编号不公开)

摘  要:首先陈述了VC编程中的一个难题——所有视图类都只能从MFC提供的类继承。然后说明如何变通的解决这个问题,使得可以从自定义的类中继承视图类,从而使得自定义的视图类有良好的层次结构。然后介绍了模板方法模式在这些视图类的界面消息处理函数中的应用。最后,给出了一个数据库应用方面的实例。Firstly, a problem in development in VC is presented, which is that all view classes should be derived from classes provided in MFC. Then a method is proposed to solve this problem, enabling deriving view classes from self-defined classes. In this way, the derived view classes possess a good hiberarchy. And then, template method pattern is introduced to facilitate message handling in those view classes. Finally, an example in database application is employed for demonstration.

关 键 词:MFC 视图类 继承 层次结构 

分 类 号:TM769[电气工程—电力系统及自动化]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象