×
Namespaces

Variants
Actions

如何去除表单的菜单项

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata

文章
翻译:
hoolee
最后由 hamishwillee 在 09 Dec 2011 编辑
  • 详细描述

你只需要在AppUi类重载你的DynInitMenuPaneL方法

void CMyAppUi::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane *aMenuPane)    
{
CAknForm::DynInitMenuPaneL( aResourceId, aMenupane);
if(aResourceId==R_AVKON_FORM_MENUPANE)
{
aMenupane->SetItemDimmed(EAknFormCmdAdd,ETrue);
aMenupane->SetItemDimmed(EAknFormCmdDelete,ETrue);
}
}

为了生成你自己的菜单项,需要:

1、在资源文件中生成一个menubar

2、将menubar id传递到CAknForm::ConstructL函数

This page was last modified on 9 December 2011, at 08:57.
46 page views in the last 30 days.
×