×

Discussion Board

Results 1 to 5 of 5

Hybrid View

  1. #1
    Super Contributor
    Join Date
    Mar 2003
    Posts
    2,426

    Series60 SDK : ChangeMenuBarL

    Calling
    aMenuBar->ChangeMenuBarL(0, R_AKNEXLIST_MENUBAR_OTHER,ETrue);

    from within
    DynInitMenuBarL( TInt aResourceId,CEikMenuBar* aMenuBar)
    does not work.

    I saw the same problem raised in January, does anybody know how to make it work ?

    Thanks

    Posted by Etienne Richelle, clevering@club-internet.fr
    on March 13, 2002 at 20:36

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Posts
    2,426

    RE: Series60 SDK : ChangeMenuBarL

    Posted by Robert Kacirek, robert.kacirek@uniweb.cz
    on March 18, 2002 at 13:37



    Hi, I had the same problems as you. I did not find a solution with ChangeMenuBarL, but you can try instead DynIniMenuBarL use DynInitMenuPaneL. This works litle bit strange, but works.
    My opinion is, that on Series60 is not standard menu bar, only a pane.

    Good luck.

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    41

    RE: Series60 SDK : ChangeMenuBarL

    Me too having the same problem.
    I was trying to work around with this and found the following piece of code work:

    --- CODE START ---

    CEikMenuBar* iMenuBar; // .h file

    iMenuBar=new(ELeave) CEikMenuBar();
    iMenuBar->ConstructL(this,0,R_YOURAPP_MENUBAR_VIEW2); // this=AppUi
    AddToStackL(iMenuBar);
    CEikonEnv::Static()->AppUiFactory()->SwapMenuBar(iMenuBar);

    --- END ---
    (If you want to switch back, use back the same code but pass in a different menubar resource ID)

    However, on exit it panicked with CONE 44. Do you know the meaning of it?
    Could you please post back here (or e-mail me) if you fix it?

    Khan Ming (ming@alchemy.com.my)

  4. #4
    Registered User
    Join Date
    Jun 2003
    Posts
    4
    CONE 44 means that: Control being destroyed is still on the control stack

    you must remove menu bar from control stack before exit

  5. #5
    Registered User
    Join Date
    Jul 2006
    Posts
    6

    Re: Series60 SDK : ChangeMenuBarL

    Actually the right solution to avoid CONE 44 would be:

    --- CODE START ---

    CEikMenuBar* iMenuBar; // .h file

    iMenuBar=new(ELeave) CEikMenuBar();
    iMenuBar->ConstructL(this,0,R_YOURAPP_MENUBAR_VIEW2); // this=AppUi
    AddToStackL(iMenuBar);
    CEikMenuBar *tempbar = CEikonEnv::Static()->AppUiFactory()->SwapMenuBar(iMenuBar);
    RemoveFromStackL(tempbar);
    delete tempbar;

    --- END ---

    - the reason is, if you replace a menu bar, you have to dispose of the old one yourself.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×