|
楼主 |
发表于 2008-4-23 13:32:07
|
显示全部楼层
这是我的步骤
这个是我的操作步骤你帮我看下吧 十分感谢JJBEAR!!
步骤如下:
1.在..\plutommi\mmi\Setting\SettingInc目录下的SettingDefs.h文件中增加如下内容:
a. enum STR_SETTING_LIST的最后增加三个字符串ID的声明:
STR_MY_SETTING,
b. enum SCR_SETTING_LIST的最后增加三个Screen ID的声明:
SCR_MY_SETTING,
c. enum IMG_SETTING_LIST的最后增加一个Image ID的声明:
IMG_MY_SETTING,
d. 在..\plutommi\mmi\Inc目录下GlobalMenuItems.h文件中enum GLOBALMENUITEMSID
的最后增加三个菜单ID的声明:(有的是在本AP或模块的*Defs.h中声明)
MENU_MY_SETTING,
2.在..\plutommi\Customer\CustResource\PLUTO_MMI目录下的Ref_list.txt中添加三个字符串:
STR_MY_SETTING Undefined 10 My Setting My Setting 我的设定 我的设定
3. 在.. \plutommi\Customer\CustResource\PLUTO_MMI\Res_MMI目录下的Res_Setting.c增加如下资源:
ADD_APPLICATION_MENUITEM((MENU_MY_SETTING,MAIN_MENU_SETTINGS_MENUID,0,SHOW, MOVEABLEWITHINPARENT,
DISP_LIST,STR_MY_SETTING,0));
ADD_APPLICATION_IMAGE2(IMG_MY_SETTING,CUST_IMG_PATH"\\\\MainLCD\\\\SubMenu\\\Settings\\\\MY_SETTING.GIF","My Setting.");
ADD_APPLICATION_STRING2(STR_MY_SETTING,"My Setting","MySetting");
4. 在.. \plutommi\Customer\CustResource\PLUTO_MMI\Res_MMI目录下的Res_MainMenu.c中修改如下:
ADD_APPLICATION_MENUITEM((MAIN_MENU_SETTINGS_MENUID,IDLE_SCREEN_
MENU_ID, 5,
MENU9102_INITIAL_SETUP,
改为: ADD_APPLICATION_MENUITEM((MAIN_MENU_SETTINGS_MENUID,IDLE_SCREEN_ MENU_ID,6,
MENU_MY_SETTING,
MENU9102_INITIAL_SETUP,
5.在..\plutommi\mmi\Setting\SettingInc\目录下的SettingProt.h中增加如下的函数声明:
extern void HighlightMySetting(void);
extern void EntryMySetting(void);
6.在..\plutommi\mmi\Setting\SettingSrc\目录下的SettingSrc.c中增加如下的函数定义:
void HighlightMySetting(void)
{
SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
SetRightSoftkeyFunction(GoBackHistory,KEY_EVENT_UP);
SetKeyHandler(EntryMySetting, KEY_RIGHT_ARROW,KEY_EVENT_DOWN);
SetLeftSoftkeyFunction(EntryMySetting,KEY_EVENT_UP);
}
void EntryMySetting(void)
{
U16 nStrItemList[MAX_SUB_MENUS];
U16 nNumofItem;
U8* guiBuffer;
U16 ImageList[MAX_SUB_MENUS];
EntryNewScreen(SCR_MY_SETTING, NULL, EntryMySetting, NULL);
guiBuffer= GetCurrGuiBuffer(SCR_MY_SETTING);
nNumofItem= GetNumOfChild(MENU_MY_SETTING);
GetSequenceStringIds(MENU_MY_SETTING,nStrItemList);
GetSequenceImageIds(MENU_MY_SETTING, ImageList);
SetParentHandler(MENU_MY_SETTING);
RegisterHighlightHandler(ExecuteCurrHiliteHandler);
ShowCategory15Screen(STR_MY_SETTING, IMG_SCR_SETTING_CAPTION, STR_GLOBAL_OK, IMG_GLOBAL_OK,STR_GLOBAL_BACK, IMG_GLOBAL_BACK, nNumofItem, nStrItemList, ImageList, LIST_MENU, 0, guiBuffer);
SetRightSoftkeyFunction(GoBackHistory,KEY_EVENT_UP);
}
7. 在..\plutommi\mmi\Setting\SettingSrc\目录下的SettingSrc.c中void InitSettingApp(void)函数下增
加如下代码:
SetHiliteHandler(MENU_MY_SETTING,HighlightMySetting); |
|