Hi,

I am using this code to add dynamically an item to the menu. It doesn´t work but I don´t know why.

Can anybody help me?




void CProyectoAppUi::DynInitMenuPaneL(TInt aMenuId,CEikMenuPane* aMenuPane)
{
if (aMenuId == R_MYAPP_MENU)
{
CEikMenuPaneItem::SData itemData;
itemData.iFlags = 0;
itemData.iCascadeId = 0;
itemData.iText = iAdditionalMenu;
itemData.iCommandId = EMyAdditionalMenusCommand;
aMenuPane->AddMenuItemL(itemData);

}

}