Thursday, January 22, 2015

HOW TO CHANGE STATUS PANE ICON

Description: 
This label explains about how to change the default staus pane provided by the s60 framework for UI Application.
Usage:
class CControlsAppContainer2;
Changes the Default Stauspane Icon:


_LIT( KIconFile, "z:\\resource\\apps\\Cotrols.mbm" ); //Path of the mbm file
ChangePaneIconL(KIconFile, EMbmCotrolsBitmap2/*Bitmap Image Id*/, EMbmCotrolsBitmap2_m/*Bitmap mask Image Id*/);

void CControlsAppContainer2::ChangePaneIconL(const TDesC& aIconFile, TInt aIndex, TInt aMask) 
{
 CEikStatusPane* StatusPane = ((CAknAppUi*)iEikonEnv->EikAppUi())->StatusPane();
 if (StatusPane )
 {
 CAknContextPane
 * ContextPane =
  (CAknContextPane*) StatusPane ->ControlL(TUid::Uid(EEikStatusPaneUidContext));
 if (ContextPane)
 {
  ContextPane->SetPictureFromFileL(aIconFile, aIndex, aMask);
 }
 }
}

Note: 
ContextPane->SetPictureToDefaultL(); //this function call will change the staus pane to default(provided by S60 UI Framework)

0 comments:

Post a Comment