notification for app change
| Wed, 2005-05-18 13:20 | |
|
hi all is it possible to get an event as soon as the application in focus changes. we can get current app in focus by using RWsSession::GetFocusWindowGroup(). but what i want is that OS notify me as soon as the current focussed app changes. warm regards, saurabh warm regards |
|






Forum posts: 5
maybe you can try to use CAknAppUi::HandleForegroundEventL.
{
if(!aForeground)
{
//App losts focus
}
else
{
//App gains focus
}
CAknAppUi::HandleForegroundEventL(aForeground);
}
Forum posts: 83
i dont think this will resolve the problem as it only notifies when ur application gets the focus.
I want to be notified whenever focus changes from one application to another. I think if i call RWindowTreeNode::EnableGroupChangeEvents() or RWindowTreeNode::EnableFocusChangeEvents() i'll be notified with EEventWindowGroupsChanged and EEventFocusGroupChanged respectively. this will resolve my problem.
But again a new problem how do i get a reference of RWindowTreeNode class.
any comments.
warm regards
saurabh
Forum posts: 83
RWindowGroup& iWinGrp = CCoeEnv::Static()->RootWin();
may be i dont know where to catch these events ( am doing them in Container's OfferKeyEventL() and in AppUi's HandleKeyEventL() )
Please help
warm regards
saurabh
Forum posts: 83
got the solution. event is reported in HandleWsEventL of appui.
warm regards
saurabh
Forum posts: 21
how you implement it in HandleWsEventL?
when i insert HandleWsEventL then my application doesn't react on something.
please help
series60.ch
Forum posts: 83
warm regards
saurabh
Forum posts: 21
series60.ch