This page was last modified 09:43, 26 September 2007.
TSS000754 - Getting notifications of focus change and launching of other applications
From Forum Nokia Wiki
| ID | TSS000754 | Creation date | September 26, 2007 |
| Platform | S60 3rd Edition | Devices | |
| Category | Base & System | Subcategory | Application Framework |
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);
}
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| application switching events | vinayakak | General Symbian C++ | 3 | 2007-08-29 10:16 |
| Apps don't start from within Visual Studio | schnesim | Symbian Tools & SDKs | 7 | 2008-06-18 10:42 |
| Updating the controls on a active window! | go4jas | General Symbian C++ | 2 | 2006-08-31 12:42 |
| Obtaining FocusControl | tziranda | Mobile Java Media (Graphics & Sounds) | 7 | 2007-11-03 07:35 |
| Publish and Subscribe problem | Suyash | General Symbian C++ | 5 | 2008-03-19 05:54 |

