通话中捕获结束(红)键
文章信息
平台:
S60 3rd Edition
S60 3rd Edition, FP1
使用下面的代码,即使在通话中应用程序也能捕获结束(红)键:
请注意: 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)测试过。


(no comments yet)