返回> 网站首页
按下红色结束通话键,程序仍然运行
yoours2009-06-11 10:41:12
简介一边听听音乐,一边写写文章。
在Symbian S60第三版中,按下红色的结束通话键,程序默认退出,当还想保持程序继续运行状态,可以在AppUi的HandleWsEventL函数中进行处理,以下代码来自ScreenShot。
// ————————————————————————–
// Starting from S60 3.x, pressing End key will terminate application.
// We don’t want this to happen in this application, so we have to handle
// End key event (KAknUidValueEndKeyCloseEvent).
// ————————————————————————–
void CXXXAppUi::HandleWsEventL(const TWsEvent &aEvent, CCoeControl *aDestination)
{
switch (aEvent.Type())
{
case KAknUidValueEndKeyCloseEvent:
break;
default:
CAknAppUi::HandleWsEventL(aEvent, aDestination);
}
}
// ————————————————————————–
// Starting from S60 3.x, pressing End key will terminate application.
// We don’t want this to happen in this application, so we have to handle
// End key event (KAknUidValueEndKeyCloseEvent).
// ————————————————————————–
void CXXXAppUi::HandleWsEventL(const TWsEvent &aEvent, CCoeControl *aDestination)
{
switch (aEvent.Type())
{
case KAknUidValueEndKeyCloseEvent:
break;
default:
CAknAppUi::HandleWsEventL(aEvent, aDestination);
}
}
文章评论
1344人参与,0条评论