Chinaunix首页 | 论坛 | 博客
  • 博客访问: 228509
  • 博文数量: 520
  • 博客积分: 2500
  • 博客等级: 少校
  • 技术积分: 5810
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-17 23:07
文章分类

全部博文(520)

文章存档

2010年(520)

我的朋友

分类:

2010-09-30 10:49:50

  我们知道在symbian的按键事件处理中使用以下方法:   tkeyresponse cmegajoycontainer::offerkeyeventl(const tkeyevent& akeyevent, teventcode atype)   这个方法是在ccoecontrol(control base class from which all other controls are derived)中定义的虚函数,其定义如下:   offerkeyeventl()virtual tkeyresponse offerkeyeventl(const tkeyevent& akeyevent,teventcode atype);   description   handles key events.   if a control wishes to process key events, it should implement this function. the implementation must ensure that the function returns   ekeywasnotconsumed   if it does not do anything in response to a key event — otherwise, other controls or dialogs may be prevented from receiving the key event. if it is able to process the event it should return   ekeywasconsumed   .   注释:   如果一个控件希望处理按键事件,那么它就应该实现这个函数。如果对一个按键事件,控件并没做任何事情,那么函数的实现中必须确保函数返回ekeywasnotconsumed。否则,(控件栈中的)其它控件或对话框可能会接收不到按键事件。如果此控件能够处理按键事件,那么它应该返回ekeywasconsumed。   when a key event occurs, the control framework calls this function for each control on the control stack, until one of them can process the key event (and returns   ekeywasconsumed   ).   注释:   当一个按键事件发生时,控件框架调用控件栈上的每个控件的offerkeyeventl方法,直到它们中的一个能够处理这个按键事件(并且返回ekeywasconsumed)。 如果喜欢symbian中的iscancode和icode请收藏或告诉您的好朋友.
阅读(174) | 评论(0) | 转发(0) |
0

上一篇: 奶汤白菜

下一篇: 壁纸表情

给主人留下些什么吧!~~