Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 05:53, 19 January 2008.

在程序中处理挂机键事件

From Forum Nokia Wiki

适用版本:

 Series 60 2nd, Series 60 3rd

具体方案: 在S60中,按下挂机键默认是关闭当前运行的程序,按下挂机键后,当前程序的AppUi中的HandleWsEventL()函数能收到type为KAknUidValueEndKeyCloseEvent的一个事件,因此如果需要使程序在按下挂机键以后执行关闭程序以外的操作可以在该函数中处理,以下为相关代码:

 void CAppNameAppUi::HandleWsEventL(const TWsEvent &aEvent, CCoeControl *aDestination)
   {
   switch (aEvent.Type())
       {
       case KAknUidValueEndKeyCloseEven;
           // 按下挂机键以后的操作
           break;
       default:
           CAknAppUi::HandleWsEventL(aEvent, aDestination);
       }
   } 

----------------------------------------------

best regards

davey_2

 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtopicQUqfnTopicZseriesE5f60Q
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX