Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

如何去除表单的菜单项

From 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 05:57.
47 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×