找回密码
 注册
搜索
楼主: lijohnsbyp

[资料] 浅谈GSM手机的MMI软件开发.doc

[复制链接]
发表于 2005-11-21 15:22:00 | 显示全部楼层
<P>Thanks</P>
点评回复

使用道具 举报

发表于 2005-11-21 17:17:00 | 显示全部楼层
<P>太黑,,,</P>
点评回复

使用道具 举报

发表于 2005-11-21 17:44:00 | 显示全部楼层
<P>好东西的目的是为了共享,在合理“收费”的情况下促进全人类的进步,兄弟你一下子收这么多太那个了吧?</P>
点评回复

使用道具 举报

发表于 2005-11-22 22:35:00 | 显示全部楼层
[em11]真是个黑心版主!
点评回复

使用道具 举报

发表于 2005-11-23 20:33:00 | 显示全部楼层
想看,但看不了啊,楼主太黑了[em03]
点评回复

使用道具 举报

发表于 2005-11-30 13:45:00 | 显示全部楼层
这个文章诉说的太过简易了,可看程度不深, 建议不要看.
[em11]
点评回复

使用道具 举报

发表于 2005-12-6 16:16:00 | 显示全部楼层
估计是原创的,对MMI软件开发还是介绍的可以,但对手机的组成划分不是很全面。
点评回复

使用道具 举报

发表于 2005-12-13 15:31:00 | 显示全部楼层
<P>mai lai kan kan xian</P>
点评回复

使用道具 举报

发表于 2005-12-20 22:15:00 | 显示全部楼层
对我这样的初学者很有用!
点评回复

使用道具 举报

发表于 2005-12-24 19:20:00 | 显示全部楼层
没有价值,不值
点评回复

使用道具 举报

发表于 2006-1-3 13:20:00 | 显示全部楼层
<P>多谢<b><FONT color=#000066>sunbiao2365兄</FONT></b></P>[em09]
点评回复

使用道具 举报

发表于 2006-1-30 22:17:00 | 显示全部楼层
为什么总是要钱呢????
点评回复

使用道具 举报

发表于 2006-3-5 21:49:00 | 显示全部楼层
<P>多谢<b><FONT color=#000066>sunbiao2365</FONT></b></P>
点评回复

使用道具 举报

发表于 2006-3-9 18:27:00 | 显示全部楼层
<P>看看吧,买了</P>
点评回复

使用道具 举报

发表于 2006-3-17 16:15:00 | 显示全部楼层
<P>真是骗人,只能说是剪了一种方案的一段而已,没多少参考价值。你知道这种方案的缺点么?</P>
点评回复

使用道具 举报

发表于 2006-3-23 14:41:00 | 显示全部楼层
OK,先顶起来再说
点评回复

使用道具 举报

发表于 2006-3-26 13:02:00 | 显示全部楼层
<P>其它地方也有这篇文章</P>
点评回复

使用道具 举报

发表于 2006-4-4 11:44:00 | 显示全部楼层
<P>我都穷死了</P>
点评回复

使用道具 举报

发表于 2006-5-8 18:59:00 | 显示全部楼层
<P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>浅谈GSM手机的MMI软件开发<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    摘要:采用面向对象的程序设计技术用C语言开发窗口结构的GSM手机MMI(人机接口)软件,程序结构清晰,代码效率高,模块可再用性好。本文粗浅地谈了GW手机MMI软件开发的功能模块组织、窗口管理等技术,并以快捷功能为例,说明具体功能的实现方法。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    关键词:人机接口(MMI)  功能模块组织  窗口管理<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    GSM手机是直接为移动用户服务的移动通信终端。其组成一般包括4个部分:射频单元、基带单元、人机接口(Man Machine Interface,缩写MMI)和软件。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>1  MMI的功能及对软件的要求<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    MMI是进行移动通信的人与提供移动通信服务的手机之间交往的界面。它包括硬件和软件:硬件有键盘、显示器、话筒、耳机和SIM卡等;软件有基本人机界面功能、用户SIM卡功能、公众移动网功能、菜单与电话本功能等。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    MMI主要有以下功能:<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>   (1)输入用户操作信息。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>   (2)以声、光、振动等手段显示手机及网络的状态、输出操作结果。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>   (3)实现GSM相关协议,如DRAFT pr ETS 300 906珍动台特性,ETS300 907移动台MMI等标准对MMI的各项要求。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>   (4)提供合理、方便的操作方法。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>   (5)对众多的功能进行分类、组织,以方便用户使用。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>   (6)增加计算器等附加功能,提高手机的实用性。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>   (7)加入动画、图标、问候语等修饰功能,使产品界面美观、友好。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    为了满足上述功能,对MMI软件的开发工作提出了以下相关要求:<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>   (1)充分消化GSM协议,完整地实现协议要求的各项基本功能。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>   (2)软件工作稳定可靠,与底层软件接口方便,以保证整机的性能。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>   (3)选用代码效率高,表达能力强,可移植性好的编程语言,以便提高产品的性能价格比,降低开发成本。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>   (4)根据GSM手机界面的具体情况,充分利用LCD显示器的表达能力,借鉴、采用最新的软件开发技术,运用图形、动画及汉化界面、汉字功能,美化产品、方便使用。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>   (5)精心组织程序结构,使软件结构清晰,各模块独立性强,可扩充性、可封装性好,便于开发小组分工合作以及各阶段开发成果的充分利用,达到缩短产品开发周期、丰富产品功能的目的。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>   (6)发挥创造性,开发特色功能、实用功能,提高产品吸引力。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>2 MMI软件功能模拟的组织结构<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    GSM手机的MMI软件有一个主程序,主要作用是建立消息循环,负责分发消息。当收到来自底层的开机消息时,MMI层软件进行初始化,并创建基本窗口。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    窗口(window)是一个术语,它可以接收消息,可能在显示屏上有一个对应的显示区域,也可以没有。字符显示区,编辑域,或者既有字符显示区又有编辑域的对话窗口都是窗口的例子。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    基本窗口是MMI层所有窗口的“根”,其它窗口都是这个窗口的子窗口。到达MMI层的GSM消息,其它窗口不处理时,都送到基本窗口中作缺省处理。在基本窗口中,根据不同情况,进行状态转换,分别创建等待关机、充电、等待插入SIM卡、等待输入PIN、等待SIM卡解锁等子窗口,处理开机及关机过程中的各项工作。顺利完成各项开机工作后,转人待机状态,创建待机窗口。如果因接听来电或拨打电话进入通话状态,则取消待机窗口,创建通话窗口。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    待机窗口可以完成拨号、启动快捷功能等工作,也可以进一步创建电话本、功能菜单等子窗口。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    菜单窗口可以派生一系列子菜单窗口,形成一棵菜单树。这棵菜单村把手机的众多功能有机地组织在一起。各个菜单窗口都是菜单窗口类的实例,菜单的选择、显示等功能都在菜单类中完成。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>3 MMI软件的核心结构——窗口管理<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    根据GSM手机MMI软件开发的具体情况,采用面向对象的程序设计技术,用C语言以窗口方式和消息驱动机制来组织软件结构,可以满足对MMI软件开发工作的各项要求。在这个技术方案中,窗口管理是整个MMI软件的核心结构。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    窗口管理为对话窗口、菜单、编辑及其它用户输入输出操作提供了一个基本框架,为消息处理提供了基本手段。由于使用了面向对象的程序设计方法,MMI软件采用消息驱动机制。窗口管理收集所有的输人信息,然后把这些输入信息以消息的形式送往合适的窗口。这些消息的执行结果又可能产生新的消息,新消息的传送仍由窗口管理负责。窗口管理通过调用窗口函数,向窗口函数传递消息参数,把消息送到目的窗口。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    窗口函数是其所属窗口在窗口管理中注册的系统函数,是窗口最重要的属性。窗口管理调用窗口函数对窗口进行操作,处理窗口接收到的所有消息。窗口函数对消息的处理方法确定了窗口的表现和行为特征。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    窗口管理调用标准的窗口函数,自动处理窗口的许多特性,应用程序只要负责创建窗口、处理窗口产生的高级事件及窗口的异常情况。在这个环境中,用户可以对GSM消息作处理,也可以让系统对GSM消息作缺省处理。窗口管理把来自键盘和软件中其它实体的消息送到具有当前焦点的窗口。在软件的整个运行过程中,总存在一个具有焦点的窗口,它负责处理输人消息,或者把消息沿着从子窗口到父窗口方向递送的传递链送到一个可以处理该消息的窗口。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    MMI层主要有两类输入消息:它们是来自系统其它部分的键盘事件消息和GSM协议栈消息。窗口消息按一定的规则选择传递路径。键盘消息是由按键的按下和释放产生的,被送往具有焦点的窗口。键盘消息最多只能传到父窗口,不能再往上传送。GSM协议栈消息可以从子窗口到父窗口按窗口层次结构一直传递,直到有一个窗口接受这条消息为止。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    窗口管理也提供了一种使消息直达某一窗口的机制,使消息可以直接送往请求这个消息的窗口。这个方法在某条消息只有一个特定的窗口感兴趣的情况下非常有用。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    MMI层内部产生的消息,一般不按窗口层次结构由于窗口向父窗口传送。如果要<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>把该类消息从子窗口向父窗口传送,子窗口要负责这项工作。未处理的消息如何传送,<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>由缺省的消息处理函数负责。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    系统提供了一些窗口类。如文本类,用于显示固定字符;菜单类,用于菜单的显<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>示和处理;编辑类,用于字符的编辑等。应用程序可以向窗口管理注册新的窗口类。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    窗口类实现了许多窗口的共同特性。向窗口管理注册后的窗口类,可以生成窗口<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>实例,很方便地为许多窗口再用。例如,菜单窗口的工作方式相同,只有当菜单窗口<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>的一个菜单项被选定时,才需要一段特定的程序来处理这特定的选择。菜单类窗口的<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>每个实例在选定特定的菜单项前的窗口管理都可以用窗口类中的同一段程序管理。这<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>里强调一下,只有向窗口管理注册了的窗口类,才能生成窗口实例。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    窗口实例继承了窗口类的特性,也可以增加自己的特性,还可以通过重载消息处<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>理函数改变从窗口类继承来的特性。生成窗口实例时,要把窗口类名、窗口名、窗口<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>识别号、窗口函数名、窗口位置数据、父窗口、窗口风格、窗口状态、窗口键盘和窗<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>口私有数据等参数送往窗口管理。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    为了方便,预先定义了一些通用的对话窗口生成函数。如通知消息对话窗口,可<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>以显示通知信息;开/关选择对话窗口,可以用于类似“开”或“关”等开关量的选<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>择;PIN输入对话窗口,可以用于输入PIN码等等。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    窗口消息在窗口函数中处理。窗口消息送往一个窗口时,实际上是送往这个窗口<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>的窗口函数。每个窗口类都必须有一个窗口函数。在窗口实例中不处理的消息一般用<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>缺省消息处理函数自动送往该窗口的窗口类的窗口函数中处理。某些在窗口类中不处<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>理的消息,如GSM事件消息,则沿着从子窗口到父窗口方向递送的传递链自动送往父<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>窗口处理。对话窗口的子窗口可能会有一个子类窗口过程,这时窗口消息首先送往具<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>有焦点的子窗口,如在待机窗口中,数字键消息首先送往电话号码编辑子窗口的窗口<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>函数中处理。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    下面以快捷功能为例,说明如何实现具体功能。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>4快捷功能及其实现<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    菜单一般按功能分类编排,有时常用的功能安排在较深的菜单下面,使用时常感<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>不便。为了方便用户访问常用功能,许多手机都有快捷功能。几种不同方法都可以实<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>现快速访问菜单项的目的。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>4.1功能编号法<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    给每个菜单项一个功能编号,在主菜单下键入这个编号,就可以进入这项菜单。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>例如主菜单第五项一子菜单第四项一下一级子菜单第一项的功能编<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>号为5-4-1。只要在主菜单下键人5、4、1,就<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>可以进入这项功能。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    每项菜单在其所属窗口中都有一个编号。这种方法其实是每次按下数字键时,选<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>中当前窗口中该数字键所代表的菜单项,逐级进入,直至调出所需的功能。这项功能<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>可以在菜单类中实现,这样,任何菜单窗口就都有用数字键选择菜单项的功能。只要<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>在菜单类的窗口函数中,加人数字键键盘消息的处理代码就可以实现这项功能。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>4.2快捷菜单法<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    在主菜单下增加一个子菜单,把原来分布在各级子菜单下的常用功能收集到这个<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>子菜单中,就组成一个快捷菜单。这些功能除了可以在各级子菜单中找到,也可以从<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>快捷菜单直接进入。快捷菜单的处理方法与普通菜单一样。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    快捷菜单本身也可以设计成用快捷键进入,其实现方法参看下面的快捷键法。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>4.3快捷键法<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    快捷键法一般是设法利用键盘上的某些键进入快捷功能。由于键的用途很多,必<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>须满足一定的条件才能进入快捷功能。比如在待机状态下,连续按住某个键约2秒进<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>入快捷功能。快捷键功能一般在待机窗口中实现,基本方法如下:<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    1)在待机窗口的电话号码编辑子窗口中,当收到有键压下的消息时,启动按键<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>计时器;当收到按键释放的消息时,按键计时器停止工作。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    2)按键计时器利用每秒一次到达待机窗口的定时器消息进行计时。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    3)按键时间超过2秒时,调用按键所代表的功能的实现函数,启动快捷功能。<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>5结束语<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>    GSM手机MMI软件的开发是一项复杂的软件工程。采用面向对象的程序设计技术用<p></p></P><P 0pt; TEXT-ALIGN: left; mso-pagination: widow-orphan; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt" align=left>C语言开发窗口结构的MMI软件,程序结构清晰,代码效率高,模块可再用性好,便于<p></p></P><P 0pt">增加产品功能,便于开发小组编程时分工合作。</P>
点评回复

使用道具 举报

发表于 2006-5-18 11:07:00 | 显示全部楼层
楼上好人!
点评回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-12-24 00:18 , Processed in 0.068616 second(s), 15 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表