×

Discussion Board

Results 1 to 11 of 11

Hybrid View

  1. #1
    Registered User
    Join Date
    Jan 2013
    Posts
    8

    Question How to get handle to power key menu

    Hi guys
    I want change the menu what shows when you press the power button key on the phone
    I already know the API to alter the menu, but I need a handle to work
    Thank you

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: How to get handle to power key menu

    What API are you using and how ?

    What excatly would you assume that should happen when you use the API, and what are you experiencing happining instead ?

  3. #3
    Registered User
    Join Date
    Jan 2013
    Posts
    8

    Re: How to get handle to power key menu

    I found this example in the symbian API help
    Code:
    void CMyappView::DynInitMenuPaneL( TInt aResourceId,
                                       CEikMenuPane* aMenuPane )
    {
      if ( aResourceId == R_COMMON_MENU )
      {
    
        CEikMenuPaneItem::SData menuFindNext;
    
        menuFindNext.iCommandId = EMyappFindNext;
    
        menuFindNext.iCascadeId = 0;
    
        menuFindNext.iFlags = 0;
    
        menuFindNext.iText = KMyappFindNext;
    
        aMenuPane->AddMenuItemL( menuFindNext );
    
      }
    }
    I need a pointer CEikMenuPane to the menu show in the power button click

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: How to get handle to power key menu

    that would work in general menu handling insaide your own application, I would not think that it would be fired when the power key is pressed outside your own application contex.

    or have you verified that this function gets called when the power key is pressed ?

  5. #5
    Registered User
    Join Date
    Jan 2013
    Posts
    8

    Re: How to get handle to power key menu

    No
    This function is to add a item to a menu
    When the user press the power button one menu appears
    So I need a handle to this menu to use my function to add another item
    I believe this menu is created when the system starts e exists while the power is on
    So I want to add a item in this menu when my app starts.
    Thx

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,740

    Re: How to get handle to power key menu

    You can track focus changes via implementing AppUi::HandleForegroundEventL. If you check it, you will see that the menu in question is provided by a completely different application. DynInitMenuPaneL in your application can not change it.

Similar Threads

  1. how to handle opeion menu in form ?
    By nokia_lin in forum Symbian User Interface
    Replies: 1
    Last Post: 2009-04-15, 12:39
  2. How to handle Pop up menu items
    By ssabestian in forum Symbian
    Replies: 3
    Last Post: 2009-02-20, 10:45
  3. How Can I Handle The Menu Screen.
    By ashutosh12 in forum Symbian
    Replies: 5
    Last Post: 2007-06-18, 06:56
  4. How to handle order of option menu
    By magovoru in forum Symbian User Interface
    Replies: 2
    Last Post: 2006-11-09, 13:57
  5. Handle menu with application in background
    By jrgm223 in forum Symbian User Interface
    Replies: 2
    Last Post: 2006-05-31, 10:40

Posting Permissions

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