Archived:Using the same background as built-in Symbian apps

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Article Metadata
Created: User:Technical writer 2 (13 Jun 2007)
Last edited: hamishwillee (14 Jun 2012)


Using the same background as built-in applications


It is possible to reuse the background image from built-in applications (Notepad, Pinboard, etc.) in a 3rd party application. In order to do so, a background control context (CAknsBasicBackgroundControlContext) with the correct skin ID must be implemented in the view/control class.
For example, to set an editor (CEikEdwin) background similar to the Notepad application, use KAknsIIDQsnFrNotepad when creating the control context:
    #include <aknsconstants.h>  // for skin IDs
    // iBackgroundContext is a member variable
    iBackgroundContext = CAknsBasicBackgroundControlContext::NewL(
            EFalse );        
    // Set the background control context of an editor (CEikEdwin)
    iEditor->SetSkinBackgroundControlContextL( iBackgroundContext );
Similarly, to use the background from the Pinboard application, the skin ID KAknsIIDQsnBgAreaMainPinb can be used. For the default skin background the ID is KAknsIIDQsnBgAreaMain. See the aknsconstants.h header file for more options.

This page was last modified on 14 June 2012, at 10:40.
59 page views in the last 30 days.