按挂机键后程序退到后台运行,按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的数组,
让观众说出心中想的数的排数,
接着程序会将这串数组的行 ......
Java中调用C/C++生成的DLL
一、 生成C的头文件
1. 编辑Main.java
public class Main
{
public native static int getStrNum(byte str[], int strLen);
}
2. 生成头文件
按win + r打开“运行”窗口,输入“cmd”,打开 ......
extern "C"
extern "C" 包含双重含义,从字面上即可得到:首先,被它修饰的目标是“extern”的;其次,被它修饰的目标是“C”的。让我们来详细解读这两重含义。
(1) 被extern "C"限定的函数或变量是extern类型的;
extern是C/C++语言中表 ......
一、概述
谈到在linux系统下编写I2C驱动,目前主要有两种方式,一种是把I2C设备当作一个普通的字符设备来处理,另一种是利用linux I2C驱动体系结构来完成。下面比较下这两种驱动。
第一种方法的好处(对应第二种方法的劣势)有:
● 思路比较直接,不需要 ......
The meaning of the c in calloc was vividly discussed in comp.lang.c in October 2000 (see here), with both clear (because, unlike malloc, calloc clears the memory it returns) and count (because, unlike malloc, calloc is passed a count of elements to allocate) suggested as possible explanations, howev ......