Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.


From Wiki
Jump to: navigation, search
Article Metadata

平台: S60 3rd Edition (initial release) and FP1
S60 3rd Edition FP1
S60 3rd Edition (initial release)

最后由 hamishwillee 在 08 Aug 2012 编辑
  • 详细描述

程序可以在一次通话使用实用下列方法捕捉挂机键。请注意这里需要SwEvent能力,以确保通知Window Server函数的成功调用。

#include <W32STD.H> // link against ws32.lib
#include <e32keys.h>
RWindowGroup& groupWin = CCoeEnv::Static()->RootWin();
TInt endKey1 = groupWin.CaptureKeyUpAndDowns( EStdKeyNo, 0, 0 );
TInt endKey2 = groupWin.CaptureKey( EKeyNo, 0, 0 );
// -> End key can now be processed before the phone application of the device...
// Cancel the capture
groupWin.CancelCaptureKeyUpAndDowns( endKey1 );
groupWin.CancelCaptureKey( endKey2 );

该解决方案已在Nokia N73(SW: 2.0620.0.05)上经过测试

This page was last modified on 8 August 2012, at 02:20.
37 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.