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
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
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 ?
I found this example in the symbian API help
I need a pointer CEikMenuPane to the menu show in the power button clickCode: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 ); } }
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 ?
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
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.