Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Talk:Changing Title Pane Text

From 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.

×