Namespaces
Variants
Actions

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

Jump to: navigation, search
Article Metadata

Tested with
Devices(s): All (S60)

Compatibility
Platform(s): S60 3rd Edition
S60 5th Edition

Article
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.
138 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved