在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); } } |