×
Namespaces

Variants
Actions

Talk:Changing Title Pane Text

From Nokia Developer Wiki
Jump to: navigation, search


// a patched verison, which does not include subPane declaration // because CEikStatusPaneBase::TPaneCapabilities is an // inner class, it is not supposed to be declare as // an automatic in the function (causing problem). // And the TUid titlePaneUid is updated to TPaneId // although they are actually the same by #define, // the strongly typed compiler may have warning.


void CUi::ChangeTitle()

   {
   TPaneId titlePaneUid;
   CEikStatusPane * statusPane;
   // peter: subPane = xxx model is doing memory copy
   titlePaneUid.iUid = EEikStatusPaneUidTitle;
   statusPane = StatusPane();  // CAknAppUi


   // original:
   // if ( subPane.IsPresent() && subPane.IsAppOwned()... )
   if ( statusPane->PaneCapabilities(titlePaneUid).IsPresent()
     && statusPane->PaneCapabilities(titlePaneUid).IsAppOwned() )
       {
       HBufC* titleText;
       CAknTitlePane* titlePane ; 
       titlePane = 
           (CAknTitlePane*) statusPane->ControlL(titlePaneUid);

       // read the title text from the resource file
    
       titleText = StringLoader::LoadLC(R_TITLE_MAIN);

       // set the title pane's text
    
       titlePane->SetTextL(*titleText);
    
       CleanupStack::PopAndDestroy(titleText);
       }
   }
 

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×