(2)保存为C文件FramewinDLG.c,然后添加到脱机模拟仿真平台CodeBlocks的emwin工程,并且编译运行,修改C文件前的显示效果如下:
(3)修改MENU①②③为竖向: static const GUI_WIDGET_CREATE_INFO _aDialogCreate[] = { { FRAMEWIN_CreateIndirect, "Framewin", ID_FRAMEWIN_0, 0, 0, 320, 240, 0, 0x64, 0 }, { MENU_CreateIndirect, "Menu", ID_MENU_0, 10, 10, 280, 20, 0, 0x0, 0 }, { MENU_CreateIndirect, "Menu", ID_MENU_1, 10, 45, 60, 150, MENU_CF_VERTICAL, 0x0, 0 }, { MENU_CreateIndirect, "Menu", ID_MENU_2, 85, 45, 60, 150, MENU_CF_VERTICAL, 0x0, 0 }, { MENU_CreateIndirect, "Menu", ID_MENU_3, 160, 45, 60, 150, MENU_CF_VERTICAL, 0x0, 0 }, };
(4)修改所有Item的ID: #define ID_MENU_00 (GUI_ID_USER + 10) #define ID_MENU_01 (GUI_ID_USER + 11) #define ID_MENU_02 (GUI_ID_USER + 12) #define ID_MENU_10 (GUI_ID_USER + 13) #define ID_MENU_11 (GUI_ID_USER + 14) #define ID_MENU_12 (GUI_ID_USER + 15) #define ID_MENU_20 (GUI_ID_USER + 16) #define ID_MENU_21 (GUI_ID_USER + 17) #define ID_MENU_22 (GUI_ID_USER + 18) #define ID_MENU_23 (GUI_ID_USER + 19) #define ID_MENU_24 (GUI_ID_USER + 20) #define ID_MENU_30 (GUI_ID_USER + 21)
|