资源描述:
《经典的菜单添加》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、以一个例子的方式介绍如何添加一个菜单,例子如下:在主菜单的“设置”菜单下增加一个“我的设定”子菜单,“我的设定”下有两个子菜单:“我的设定1”和“我的设定2”,打开这两个菜单,分别显示一幅动画。步骤如下:1.在..plutommimmiSettingSettingInc目录下的SettingDefs.h文件中增加如下内容:a.enumSTR_SETTING_LIST的最后增加三个字符串ID的声明:STR_MY_SETTING,STR_MY_SETTING1,STR_MY_SETTING2,b.enumSCR_SETTING
2、_LIST的最后增加三个ScreenID的声明:SCR_MY_SETTING,SCR_MY_SETTING1,SCR_MY_SETTING2,c.enumIMG_SETTING_LIST的最后增加一个ImageID的声明:IMG_MY_SETTING,2.3.4.d.在..plutommimmiInc目录下GlobalMenuItems.h文件中enumGLOBALMENUITEMSID的最后增加三个菜单ID的声明:(有的是在本AP或模块的*Defs.h中声明)MENU_MY_SETTING,MENU_MY_SETTING1
3、,MENU_MY_SETTING2,2.在..plutommiCustomerCustResourcePLUTO_MMI目录下的Ref_list.txt中添加三个字符串:STR_MY_SETTINGUndefined10MySettingMySetting发送短信发送短信STR_MY_SETTING1Undefined10MySetting1MySetting1我的设定1我的设定1STR_MY_SETTING2Undefined10MySetting2MySetting2我的设定2我的设定2(用excel打开文件,编辑完后
4、不要保存,直接复制增加或修改部分,粘贴到Ref_list.txt里) 3.在..plutommiCustomerCustResourcePLUTO_MMIRes_MMI目录下的Res_Setting.c增加如下资源:ADD_APPLICATION_MENUITEM((MENU_MY_SETTING,MAIN_MENU_SETTINGS_MENUID, 2,MENU_MY_SETTING1, MENU_MY_SETT
5、ING2, SHOW,MOVEABLEWITHINPARENT, DISP_LIST,STR_MY_SETTING,0));ADD_APPLICATION_MENUITEM((MENU_MY_SETTING1,MENU_MY_SETTING,0,SHOW, MOVEABLEWITHINPARENT,DISP_LIST,STR_MY_SETTING1,0));ADD_APPLICATION_M
6、ENUITEM((MENU_MY_SETTING2,MENU_MY_SETTING,0,SHOW, MOVEABLEWITHINPARENT,DISP_LIST,STR_MY_SETTING2,0));ADD_APPLICATION_IMAGE2(IMG_MY_SETTING,CUST_IMG_PATH"\\MainLCD\\SubMenu \Settings\\MY_SETTING.GIF","MySetting.");A
7、DD_APPLICATION_STRING2(STR_MY_SETTING,"MySetting","MySetting");ADD_APPLICATION_STRING2(STR_MY_SETTING1,"MySetting1","MySetting1");ADD_APPLICATION_STRING2(STR_MY_SETTING2,"MySetting2","MySetting2"); 4.在..plutommiCustomerCustResourcePLUTO_MMIRes_MMI目录下的Res_MainMen
8、u.c中修改如下:ADD_APPLICATION_MENUITEM((MAIN_MENU_SETTINGS_MENUID,IDLE_SCREEN_ MENU_ID,5,