首页 | 本学科首页   官方微博 | 高级检索  
     

用子类处理实现图标菜单
引用本文:李为民,孟淑芳.用子类处理实现图标菜单[J].河北工业大学学报,2002,31(6):49-52.
作者姓名:李为民  孟淑芳
作者单位:1. 河北工业大学,机床厂,天津,300130
2. 河北工业大学,燕赵学术交流中心,天津,300130
摘    要:论述如何用子类处理方法,捕获Windows系统传递到窗口的命令,进而生成带自定义图标的菜单;同时封装一个复杂过程,允许原消息处理函数实际执行命令以简化代码。自定义类对象封装了任一菜单项自定义图标的绘制过程;菜单维护模块创建并管理自定义类对象的一系列实例,所有实例联合注册为用户自定义菜单。除菜单检测与绘制操作由用户自定义函数完成外,其他操作皆通过消息传递函数返回Windows系统。

关 键 词:子类处理  菜单  封装  对象  模块  自定义图标  绘制  Windows系统  API函数
文章编号:1007-2373(2002)06-0049-04
修稿时间:2002年2月20日

Creating Icon Menu by Subclassing
LI Wei-min,MENG Shu-fang.Creating Icon Menu by Subclassing[J].Journal of Hebei University of Technology,2002,31(6):49-52.
Authors:LI Wei-min  MENG Shu-fang
Abstract:This article demonstrates the process of subclassing your window in order to catch commands that are passed by the Windows OS to the window in which owner drawn menus have been created. Meanwhile a complex process is encapsulated to allow simple code in the actual implementation of the object. The user defined class object encapsulates the process of drawing each menu entry and the menu maintenance code module manages a list of instances created from user defined class object which represent each menu entry that has been registered as an owner drawn menu. Most of the operations call back to the Windows OS except the measuring and drawing model.
Keywords:subclassing  owner drawn menu  encapsulate  instance  object  module
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号