如何得到其他程序焦点变化和启动的通知
来源:互联网 发布:java和嵌入式 编辑:程序博客网 时间:2024/06/05 19:36
Getting notifications of focus change and launching of other applications
From Forum Nokia Wiki
Description
Sometimes applications need to get notifications about the change of the application in focus or launching of another application.
Solution
The notifications can be enabled using the following code:
In the constructL of the AppUi, add the following lines:
iCoeEnv->RootWin().EnableFocusChangeEvents();
//To get notifications about Focus change events
iCoeEnv->RootWin().EnableGroupChangeEvents();
//To get notifications about launching of other applications
After these functions are called, the events are delivered to the window server every time the particular event occurs. The code to handle the notifications is as follows:
void CMyAppUi::HandleWsEventL( const TWsEvent& aEvent,
CCoeControl* aDestination )
{
if(aEvent.Type() == EEventFocusGroupChanged)
{
//Focus change event
//Handling to be done here
}
else if(aEvent.Type() == EEventWindowGroupsChanged)
{
//Group change event (launching of other applications)
//Handling to be done here
}
CAknAppUi::HandleWsEventL(aEvent,aDestination);
}
- 如何得到其他程序焦点变化和启动的通知
- Android EditText得到和失去焦点、内容变化的监听
- 如何在MFC程序中启动其他的exe程序
- 得到启动程序的路径
- 得到和失去焦点
- Android Training - 和其他程序交互(3) - 允许其他程序启动你的activity
- spring aop 环绕通知around和其他通知的区别
- 获取其他程序焦点位置句柄的方法
- iOS8 通知的变化
- iOS8 通知的变化
- IOS通知的变化
- 调试 其他由其他程序启动的EXE程序--方法
- [Android]检测和启动其他程序
- 如何在android应用程序中启动其他apk程序,被启动程序退出后返回之前的程序
- 如何在android应用程序中启动其他apk程序,被启动程序退出后返回之前的程序?
- 如何实现vim和其他程序的复制粘贴
- 失去和得到焦点OnActivate
- 失去和得到焦点OnActivate
- Sync Moto-A1200 with GMAIL contacts by SyncML
- 兽药价值营销对抗同质化
- Linux /proc/cpuinfo flags
- JSP文件下载
- PKU2299-求逆序数的题-实现(归并排序和树状数组)
- 如何得到其他程序焦点变化和启动的通知
- PostgreSQL RPM 安装笔记
- Android开发学习日记 -- 1.安装与HelloWorld
- 全球四大国际反垃圾邮件组织介绍
- 打印。。。。。
- c#打印机设置,取得打印机列表及相应打印机的所有纸张格式
- 无线路由连接局域网
- 创建一个文件夹
- java Map 遍历速度最优解