×
Namespaces

Variants
Actions
Revision as of 07:39, 1 August 2012 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Changing the owning window group of a Symbian C++ application

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): All (S60)
CompatibilityArticle
Keywords: SetOwningWindowGroup
Created: User:Technical writer 2 (July 4, 2007
Updated: May 7, 2010)
Last edited: hamishwillee (01 Aug 2012)

Description

It is possible to select the task that will be brought to the foreground after exiting an application. By default, if the application was launched from the menu (application grid), the menu will also return to foreground when the application exits.

This can be changed by setting the owning window group for an application:

  void RWindowGroup::SetOwningWindowGroup( TInt aIdentifier );

Solution

The following piece of code demonstrates how to set the idle screen of the phone application as the owning window group, which will be brought to foreground when this application exits.

 #include <apgtask.h>    // link against apgrfx.lib, ws32.lib
 
const TUid KUidPhoneIdle = { 0x100058B3 }; // 0x101FD64C in S60 3rd Ed (3.0)
TApaTaskList taskList( iCoeEnv->WsSession() );
TApaTask task = taskList.FindApp( KUidPhoneIdle );
if( task.Exists() )
{
iCoeEnv->RootWin().SetOwningWindowGroup( task.WgId() );
}

Note that the UID of the phone application has changed between S60 3rd Edition and S60 3rd Edition, FP1.

This page was last modified on 1 August 2012, at 07:39.
77 page views in the last 30 days.
×