×
Namespaces

Variants
Actions

如何在通过中捕捉挂机键

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata

文章
User:Jiangbaolan 在 01 Apr 2009 创建
最后由 hamishwillee 在 15 Dec 2011 编辑

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


Code:

  1. include <W32STD.H> // link against ws32.lib
  2. 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 15 December 2011, at 09:31.
26 page views in the last 30 days.