按挂机键后程序退到后台运行,按c键结束程序
目的:当程序在前台运行时,按挂机键程序不退出,只是退到后台运行,程序在后台运行时,按c键能把程序结束
方法:在HandleWsEventL()中屏蔽挂机键KAknUidValueEndKeyCloseEvent,在值在avkon.hrh中定义,实践中发现8.0sdk的avkon.hrh没有定义KAknUidValueEndKeyCloseEvent,唯有手工添加定义#define KAknUidValueEndKeyCloseEvent 0x101F87F0
测试:在3230,N70和E61i上测试通过
void CMyClientAppUi::HandleWsEventL(const TWsEvent &aEvent, CCoeControl *aDestination)
{
switch (aEvent.Type())
{
case KAknUidValueEndKeyCloseEvent:
break;
default:
CAknAppUi::HandleWsEventL(aEvent, aDestination);
}
}
// ----------------------------------------------------
// CPocoClientAppUi::HandleCommandL(TInt aCommand)
// takes care of command handling
// ----------------------------------------------------
//
void CMyClientAppUi::HandleCommandL(TInt aCommand)
{
switch ( aCommand )
{
case EEikCmdExit:
{
Exit();
break;
}
// TODO: Add Your command handling code here
default:
break;
}
}
相关文档:
-------------------------
--------------------------------------
--------------------------------------
viki 2010.1.25 制作 程序里的答案为Y
===================================
程序进去后,先输入16个数每个数按回车。
然后生成一个4x4的数组,
让观众说出心中想的数的排数,
接着程序会将这串数组的行 ......
[This was posted to comp.lang.c by its author, David Anderson, on 1994-05-06.]
The ``Clockwise/Spiral Rule''
By David Anderson
There is a technique known as the ``Clockwise/Spiral Rule'' which enables any C programmer to parse in their head any C declaration!
There are three simple steps to fo ......
extern "C"
extern "C" 包含双重含义,从字面上即可得到:首先,被它修饰的目标是“extern”的;其次,被它修饰的目标是“C”的。让我们来详细解读这两重含义。
(1) 被extern "C"限定的函数或变量是extern类型的;
extern是C/C++语言中表 ......
当读者有一定c/c++基础
推荐的阅读顺序:
level 1
从<<essential c++>>开始,短小精悍,可以对c++能进一步了解其特性
以<<c++ primer>>作字典和课外读物,因为太厚不可能一口气看完
level 2
然后从<<effective c++>>开始转职,这是圣经,请遵守10诫,要经常看,没事就拿来翻翻
......