它们都有很多的共性。这样方便我们修改代码,也使流程清晰化。
Rmd中国设计秀
Rmd中国设计秀
Rmd中国设计秀
程序代码如下(省略了大段系统自动生成的注释后):
Rmd中国设计秀
Rmd中国设计秀
Rmd中国设计秀
Rmd中国设计秀
代码
Rmd中国设计秀
1 #include "AEEModGen.h" // Module interface definitions
Rmd中国设计秀
2 #include "AEEAppGen.h" // Applet interface definitions
Rmd中国设计秀
3 #include "AEEShell.h" // Shell interface definitions
Rmd中国设计秀
4
Rmd中国设计秀
5 #include "AEEMenu.h"
Rmd中国设计秀
6 #include "menuctltest.brh"
Rmd中国设计秀
7
Rmd中国设计秀
8 #include "menuctltest.bid"
Rmd中国设计秀
9
Rmd中国设计秀
10 #define MAIN_TITLE_HEIGHT 30//最上面标题的高度
Rmd中国设计秀
11 #define SOFT_KEY_HEIGHT 30//最下面菜单的高度
Rmd中国设计秀
12
Rmd中国设计秀
13 #define RES_STR_MAX_LEN 16//资源文件字符串的最大长度
Rmd中国设计秀
14
Rmd中国设计秀
15 #define TITLE_BACK_COLOR MAKE_RGB(28,28,28)//最上面标题栏的背景颜色
Rmd中国设计秀
16 #define ITEM_BACK_COLOR MAKE_RGB(44,44,44)//中间菜单区域的
Rmd中国设计秀
17 #define ITEM_TEXT_COLOR MAKE_RGB(255,255,255)//中间菜单文本的颜色
Rmd中国设计秀
18 #define ITEM_SEL_BACK_COLOR MAKE_RGB(46,90,185)//已经选择文本的背景颜色
Rmd中国设计秀
19 #define ITEM_SEL_TEXT_COLOR MAKE_RGB(255,255,255)//已经选择文本的字体颜色
Rmd中国设计秀
20 #define ITEM_FRAME_COLOR MAKE_RGB(83,162,241)//边框颜色
Rmd中国设计秀
21
Rmd中国设计秀
22 /*-------------------------------------------------------------------
Rmd中国设计秀
23 Applet structure. All variables in here are reference via "pMe->"
Rmd中国设计秀
24 -------------------------------------------------------------------*/
Rmd中国设计秀
25 // create an applet structure that's passed around. All variables in
Rmd中国设计秀
26 // here will be able to be referenced as static.
Rmd中国设计秀
27 typedef struct _menuctltest {
Rmd中国设计秀
28 AEEApplet a ; // First element of this structure must be AEEApplet
Rmd中国设计秀
29 AEEDeviceInfo DeviceInfo; // always have access to the hardware device information
Rmd中国设计秀
30
Rmd中国设计秀
31 // add your own variables here...
Rmd中国设计秀
32 IMenuCtl* p_MainMenuCtl;//指向IMenuCtl的指针,用来显示和控制中间主要的菜单项
Rmd中国设计秀
33 IMenuCtl* p_SoftKeyCtl;//指向IMenuCtl的指针,用来显示和控制底部的菜单项
Rmd中国设计秀
34 AEERect p_WholeScreen;//定义一个全屏的矩形变量
Rmd中国设计秀
35 AECHAR p_MainTitle[RES_STR_MAX_LEN];//定义获取标题资源字符串的数组
Rmd中国设计秀
36 int r_BlodFontHeight;//定义获取粗体字字符高度的变量
Rmd中国设计秀
37 } menuctltest;
Rmd中国设计秀
38
Rmd中国设计秀
39 /*-------------------------------------------------------------------
Rmd中国设计秀
40 Function PRototypes
Rmd中国设计秀
41 -------------------------------------------------------------------*/
Rmd中国设计秀
42 static boolean menuctltest_HandleEvent(menuctltest* pMe,
Rmd中国设计秀
43 AEEEvent eCode, uint16 wParam,
Rmd中国设计秀
44 uint32 dwParam);
Rmd中国设计秀
45 boolean menuctltest_InitAppData(menuctltest* pMe);
Rmd中国设计秀
46 void menuctltest_FreeAppData(menuctltest* pMe);
Rmd中国设计秀
47 static void InitMainMenu(menuctltest* pMe);//初始化放置中间主菜单和底部菜单的矩形样式的方法
Rmd中国设计秀
48 static void ShowAnimation(menuctltest* pMe);//一开始显示程序图标及文字的方法
Rmd中国设计秀
49 static void ShowMain(menuctltest* pMe);//显示主要界面的方法
Rmd中国设计秀
50 static void DrawTitle(menuctltest* pMe);//绘制最上面标题文字的方法
Rmd中国设计秀
51 /*===============================================================================
Rmd中国设计秀
52 FUNCTION DEFINITIONS
Rmd中国设计秀
53 =============================================================================== */
Rmd中国设计秀
54 int AEEClsCreateInstance(AEECLSID ClsId, IShell *pIShell, IModule *po, void **ppObj)
Rmd中国设计秀
55 {
Rmd中国设计秀
56 *ppObj = NULL;
Rmd中国设计秀
57
Rmd中国设计秀
58 if( ClsId == AEECLSID_MENUCTLTEST )
Rmd中国设计秀
59 {
Rmd中国设计秀
60 // Create the applet and make room for the applet structure
Rmd中国设计秀
61 if( AEEApplet_New(sizeof(menuctltest),
Rmd中国设计秀
62 ClsId,
Rmd中国设计秀
63 pIShell,
Rmd中国设计秀
64 po,
Rmd中国设计秀
65 (IApplet**)ppObj,
Rmd中国设计秀
66 (AEEHANDLER)menuctltest_HandleEvent,
Rmd中国设计秀
67 (PFNFREEAPPDATA)menuctltest_FreeAppData) ) // the FreeAppData function is called after sending EVT_APP_STOP to the HandleEvent function
Rmd中国设计秀
68
Rmd中国设计秀
69 {
Rmd中国设计秀
70 //Initialize applet data, this is called before sending EVT_APP_START
Rmd中国设计秀
71 // to the HandleEvent function
Rmd中国设计秀
72 if(menuctltest_InitAppData((menuctltest*)*ppObj))
Rmd中国设计秀
73 {
Rmd中国设计秀
74 //Data initialized successfully
Rmd中国设计秀
75 return(AEE_SUCCESS);
Rmd中国设计秀
76 }
Rmd中国设计秀
77 else
Rmd中国设计秀
78 {
Rmd中国设计秀
79 //Release the applet. This will free the memory allocated for the applet when
Rmd中国设计秀
80 // AEEApplet_New was called.
Rmd中国设计秀
81 IAPPLET_Release((IApplet*)*ppObj);
Rmd中国设计秀
82 return EFAILED;
Rmd中国设计秀
83 }
Rmd中国设计秀
84
Rmd中国设计秀
85 } // end AEEApplet_New
Rmd中国设计秀
86
Rmd中国设计秀
87 }
Rmd中国设计秀
88
Rmd中国设计秀
89 return(EFAILED);
Rmd中国设计秀
90 }
Rmd中国设计秀
91
Rmd中国设计秀
92 static boolean menuctltest_HandleEvent(menuctltest* pMe, AEEEvent eCode, uint16 wParam, uint32 dwParam)
Rmd中国设计秀
93 {
Rmd中国设计秀
94 //菜单控件对象处理接收事件的系统方法。如果是典型按键按下事件,则将由系统处理;如果不是,后面自己写的代码处理。
Rmd中国设计秀
95 if( pMe->p_MainMenuCtl && IMENUCTL_HandleEvent( pMe->p_MainMenuCtl, eCode, wParam, dwParam) )
Rmd中国设计秀
96 return TRUE;
Rmd中国设计秀
97
Rmd中国设计秀
98 switch (eCode)
Rmd中国设计秀
99 {
Rmd中国设计秀
100 // App is told it is starting up
Rmd中国设计秀
101 case EVT_APP_START:
Rmd中国设计秀
102 // Add your code here...
Rmd中国设计秀
103 ShowAnimation(pMe);
Rmd中国设计秀
104 return(TRUE);
Rmd中国设计秀
105
Rmd中国设计秀
106
Rmd中国设计秀
107 // App is told it is exiting
Rmd中国设计秀
108 case EVT_APP_STOP:
Rmd中国设计秀
109 // Add your code here...
Rmd中国设计秀
110
Rmd中国设计秀
111 return(TRUE);
Rmd中国设计秀
112
Rmd中国设计秀
113
Rmd中国设计秀
114 // App is being suspended
Rmd中国设计秀
115 case EVT_APP_SUSPEND:
Rmd中国设计秀
116 // Add your code here...
Rmd中国设计秀
117
Rmd中国设计秀
118 return(TRUE);
Rmd中国设计秀
119
Rmd中国设计秀
120
Rmd中国设计秀
121 // App is being resumed
Rmd中国设计秀
122 case EVT_APP_RESUME:
Rmd中国设计秀
123 // Add your code here...
Rmd中国设计秀
124
Rmd中国设计秀
125 return(TRUE);
Rmd中国设计秀
126
Rmd中国设计秀
127
Rmd中国设计秀
128 // An SMS message has arrived for this app. Message is in the dwParam above as (char *)
Rmd中国设计秀
129 // sender simply uses this format "//BREW:ClassId:Message", example //BREW:0x00000001:Hello World
Rmd中国设计秀
130 case EVT_APP_MESSAGE:
Rmd中国设计秀
131 // Add your code here...
Rmd中国设计秀
132
Rmd中国设计秀
133 return(TRUE);
Rmd中国设计秀
134
Rmd中国设计秀
135 // A key was pressed. Look at the wParam above to see which key was pressed. The key
Rmd中国设计秀
136 // codes are in AEEVCodes.h. Example "AVK_1" means that the "1" key was pressed.
Rmd中国设计秀
137 case EVT_KEY:
Rmd中国设计秀
138 // Add your code here...
Rmd中国设计秀
139
Rmd中国设计秀
140 return(TRUE);
Rmd中国设计秀
141
Rmd中国设计秀
142
Rmd中国设计秀
143 // If nothing fits up to this point then we'll just break out
Rmd中国设计秀
144 default:
Rmd中国设计秀
145 break;
Rmd中国设计秀
146 }
Rmd中国设计秀
147
Rmd中国设计秀
148 return FALSE;
Rmd中国设计秀
149 }
Rmd中国设计秀
150
Rmd中国设计秀
151
Rmd中国设计秀
152 // this function is called when your application is starting up
Rmd中国设计秀
153 boolean menuctltest_InitAppData(menuctltest* pMe)
Rmd中国设计秀
154 {
Rmd中国设计秀
155 // Get the device information for this handset.
Rmd中国设计秀
156 // Reference all the data by looking at the pMe->DeviceInfo structure
Rmd中国设计秀
157 // Check the API reference guide for all the handy device info you can get
Rmd中国设计秀
158 pMe->DeviceInfo.wStructSize = sizeof(pMe->DeviceInfo);
Rmd中国设计秀
159 ISHELL_GetDeviceInfo(pMe->a.m_pIShell,&pMe->DeviceInfo);
Rmd中国设计秀
160
Rmd中国设计秀
161 // Insert your code here for initializing or allocating resources...
Rmd中国设计秀
162 // 创建了两个IMenuCtl对象
Rmd中国设计秀
163 if( ISHELL_CreateInstance(pMe->a.m_pIShell, AEECLSID_MENUCTL, (void**)(&pMe->p_MainMenuCtl)) != SUCCESS)
Rmd中国设计秀
164 return FALSE;
Rmd中国设计秀
165 if( ISHELL_CreateInstance(pMe->a.m_pIShell, AEECLSID_SOFTKEYCTL, (void**)(&pMe->p_SoftKeyCtl)) != SUCCESS)
Rmd中国设计秀
166 return FALSE;
Rmd中国设计秀
167
Rmd中国设计秀
168 //获取粗体字字符的高度
Rmd中国设计秀
169 pMe->r_BlodFontHeight = IDISPLAY_GetFontMetrics( pMe->a.m_pIDisplay, AEE_FONT_BOLD, NULL, NULL) + 1;
Rmd中国设计秀
170 //初始化获取全屏的矩形变量
Rmd中国设计秀
171 SETAEERECT( &pMe->p_WholeScreen, 0, 0, pMe->DeviceInfo.cxScreen, pMe->DeviceInfo.cyScreen);
Rmd中国设计秀
172 InitMainMenu(pMe);
Rmd中国设计秀
173 // if there have been no failures up to this point then return success
Rmd中国设计秀
174 return TRUE;
Rmd中国设计秀
175 }
Rmd中国设计秀
176
Rmd中国设计秀
177 // this function is called when your application is exiting
Rmd中国设计秀
178 void menuctltest_FreeAppData(menuctltest* pMe)
Rmd中国设计秀
179 {
Rmd中国设计秀
180 // insert your code here for freeing any resources you have allocated...
Rmd中国设计秀
181
Rmd中国设计秀
182 // example to use for releasing each interface:
Rmd中国设计秀
183 // if ( pMe->pIMenuCtl != NULL ) // check for NULL first
Rmd中国设计秀
184 // {
Rmd中国设计秀
185 // IMENUCTL_Release(pMe->pIMenuCtl) // release the interface
Rmd中国设计秀
186 // pMe->pIMenuCtl = NULL; // set to NULL so no problems trying to free later
Rmd中国设计秀
187 // }
Rmd中国设计秀
188 //
Rmd中国设计秀
189 //释放IMenuCtl指针资源
Rmd中国设计秀
190 if ( pMe->p_MainMenuCtl != NULL)
Rmd中国设计秀
191 {
Rmd中国设计秀
192 IMENUCTL_Release(pMe->p_MainMenuCtl);
Rmd中国设计秀
193 pMe->p_MainMenuCtl = NULL;
Rmd中国设计秀
194 }
Rmd中国设计秀
195 if( pMe->p_SoftKeyCtl != NULL)
Rmd中国设计秀
196 {
Rmd中国设计秀
197 IMENUCTL_Release(pMe->p_SoftKeyCtl);
Rmd中国设计秀
198 pMe->p_SoftKeyCtl = NULL;
Rmd中国设计秀
199 }
Rmd中国设计秀
200 }
Rmd中国设计秀
201
Rmd中国设计秀
202 static void InitMainMenu(menuctltest* pMe)
Rmd中国设计秀
203 {
Rmd中国设计秀
204 AEEMenuColors colors;
Rmd中国设计秀
205 AEEItemStyle style1,style2;
Rmd中国设计秀
206 AEERect rect;
Rmd中国设计秀
207
Rmd中国设计秀
208 SETAEERECT( &rect, 0, MAIN_TITLE_HEIGHT, pMe->DeviceInfo.cxScreen, pMe->DeviceInfo.cyScreen - MAIN_TITLE_HEIGHT - SOFT_KEY_HEIGHT);
Rmd中国设计秀
209 IMENUCTL_SetRect( pMe->p_MainMenuCtl, &rect );
Rmd中国设计秀
210 SETAEERECT( &rect, 0, pMe->DeviceInfo.cyScreen - SOFT_KEY_HEIGHT, pMe->DeviceInfo.cxScreen, SOFT_KEY_HEIGHT );
Rmd中国设计秀
211 IMENUCTL_SetRect( pMe->p_SoftKeyCtl, &rect);
Rmd中国设计秀
212
Rmd中国设计秀
213 //设置显示文字的样式
Rmd中国设计秀
214 colors.cBack = ITEM_BACK_COLOR;
Rmd中国设计秀
215 colors.cText = ITEM_TEXT_COLOR;
Rmd中国设计秀
216 colors.cSelBack = ITEM_SEL_BACK_COLOR;
Rmd中国设计秀
217 colors.cSelText = ITEM_SEL_TEXT_COLOR;
Rmd中国设计秀
218 colors.cFrame = ITEM_FRAME_COLOR;
Rmd中国设计秀
219 colors.wMask = MC_BACK|MC_TEXT|MC_SEL_BACK|MC_SEL_TEXT|MC_FRAME;
Rmd中国设计秀
220 IMENUCTL_SetColors( pMe->p_MainMenuCtl, &colors);
Rmd中国设计秀
221 colors.cBack = TITLE_BACK_COLOR;
Rmd中国设计秀
222 colors.cText = ITEM_TEXT_COLOR;
Rmd中国设计秀
223 colors.cSelBack = ITEM_SEL_BACK_COLOR;
Rmd中国设计秀
224 colors.cSelText = ITEM_SEL_TEXT_COLOR;
Rmd中国设计秀
225 colors.cFrame = ITEM_FRAME_COLOR;
Rmd中国设计秀
226 colors.wMask = MC_BACK|MC_TEXT|MC_SEL_BACK|MC_SEL_TEXT|MC_FRAME;
Rmd中国设计秀
227 IMENUCTL_SetColors( pMe->p_SoftKeyCtl, &colors);
Rmd中国设计秀
228
Rmd中国设计秀
229 //设置主菜单和底部菜单已选择的菜单样式和一般菜单样式
Rmd中国设计秀
230 style1.ft = AEE_FT_NONE;
Rmd中国设计秀
231 style1.roImage = AEE_RO_NOT;
Rmd中国设计秀
232 style1.xOffset = 4;
Rmd中国设计秀
233 style1.yOffset = 4;
Rmd中国设计秀
234 style2.ft = AEE_FT_BOX;
Rmd中国设计秀
235 style2.roImage = AEE_RO_NOT;
Rmd中国设计秀
236 style2.xOffset = 4;
Rmd中国设计秀
237 style2.yOffset = 4;
Rmd中国设计秀
238 IMENUCTL_SetStyle(pMe->p_MainMenuCtl, &style1, &style2);
Rmd中国设计秀
239 IMENUCTL_SetStyle(pMe->p_SoftKeyCtl, &style1, &style2);
Rmd中国设计秀
240 }
Rmd中国设计秀
241
Rmd中国设计秀
242 static void ShowAnimation(menuctltest* pMe)
Rmd中国设计秀
243 {
Rmd中国设计秀
244 IImage* p_Image = NULL;
Rmd中国设计秀
245 AEEImageInfo rImageInfo;
Rmd中国设计秀
246
Rmd中国设计秀
247 //读取资源文件里的图片资源
Rmd中国设计秀
248 p_Image = ISHELL_LoadResImage( pMe->a.m_pIShell, MENUCTLTEST_RES_FILE, IDI_START_IMG);
Rmd中国设计秀
249
Rmd中国设计秀
250 if( p_Image)
Rmd中国设计秀
251 {
Rmd中国设计秀
252 int x,y;
Rmd中国设计秀
253 AECHAR tempArr[RES_STR_MAX_LEN];
Rmd中国设计秀
254
Rmd中国设计秀
255 //先将要显示开始动画的区域填充颜色
Rmd中国设计秀
256 IDisplay_FillRect( pMe->a.m_pIDisplay, &pMe->p_WholeScreen, ITEM_BACK_COLOR );
Rmd中国设计秀
257 //得到图片的相关信息
Rmd中国设计秀
258 IIMAGE_GetInfo( p_Image, &rImageInfo);
Rmd中国设计秀
259 //设置图片出现在屏幕上的左上角位置(在屏幕中水平、竖直都居中)
Rmd中国设计秀
260 x = (pMe->p_WholeScreen.x + pMe->p_WholeScreen.dx - rImageInfo.cx) / 2;
Rmd中国设计秀
261 y = (pMe->p_WholeScreen.y + pMe->p_WholeScreen.dy - rImageInfo.cy) / 2 - pMe->r_BlodFontHeight;
Rmd中国设计秀
262 //将图片显示出来
Rmd中国设计秀
263 IIMAGE_Draw( p_Image, x, y );
Rmd中国设计秀
264 //读取资源中的文本
Rmd中国设计秀
265 ISHELL_LoadResString( pMe->a.m_pIShell, MENUCTLTEST_RES_FILE, IDS_START_TITLE, tempArr, RES_STR_MAX_LEN * sizeof(AECHAR));
Rmd中国设计秀
266 //确定图片下文本的位置
Rmd中国设计秀
267 x = (pMe->DeviceInfo.cxScreen - IDisplay_MeasureText( pMe->a.m_pIDisplay, AEE_FONT_NORMAL, tempArr)) / 2;
Rmd中国设计秀
268 y += rImageInfo.cy + 6;
Rmd中国设计秀
269 //将文本显示出来
Rmd中国设计秀
270 IDisplay_DrawText( pMe->a.m_pIDisplay, AEE_FONT_NORMAL, tempArr, -1, x, y, NULL, IDF_TEXT_INVERTED | IDF_TEXT_TRANSPARENT);
Rmd中国设计秀
271 //更新屏幕用于显示
Rmd中国设计秀
272 IDisplay_Update(pMe->a.m_pIDisplay);
Rmd中国设计秀
273 //释放IImage对象
Rmd中国设计秀
274 IImage_Release(p_Image);
Rmd中国设计秀
275 //设置图片显示时间及显示完成后调用的函数
Rmd中国设计秀
276 ISHELL_SetTimer( pMe->a.m_pIShell, 2000, (PFNNOTIFY) ShowMain, (void *)pMe);
Rmd中国设计秀
277 }
Rmd中国设计秀
278 else
Rmd中国设计秀
279 {
Rmd中国设计秀
280 ShowMain(pMe);
Rmd中国设计秀
281 }
Rmd中国设计秀
282 }
Rmd中国设计秀
283
Rmd中国设计秀
284 static void ShowMain(menuctltest* pMe)
Rmd中国设计秀
285 {
Rmd中国设计秀
286 AEERect rect;
Rmd中国设计秀
287
Rmd中国设计秀
288 //设置标题的背景矩形并填充颜色
Rmd中国设计秀
289 SETAEERECT( &rect, 0, 0, pMe->DeviceInfo.cxScreen, MAIN_TITLE_HEIGHT);
Rmd中国设计秀
290 IDisplay_FillRect( pMe->a.m_pIDisplay, &rect, TITLE_BACK_COLOR);
Rmd中国设计秀
291 //读取资源文件中的标题文字
Rmd中国设计秀
292 ISHELL_LoadResString( pMe->a.m_pIShell, MENUCTLTEST_RES_FILE, IDS_MAIN_TITLE, pMe->p_MainTitle, RES_STR_MAX_LEN * sizeof( AECHAR));
Rmd中国设计秀
293 //将标题文字输出
Rmd中国设计秀
294 DrawTitle(pMe);
Rmd中国设计秀
295
Rmd中国设计秀
296 //从数据库读取中间菜单项并添加
Rmd中国设计秀
297 IMENUCTL_AddItem( pMe->p_MainMenuCtl, MENUCTLTEST_RES_FILE, IDS_MAIN_MENU_ONE, IDS_MAIN_MENU_ONE, NULL, 0);
Rmd中国设计秀
298 IMENUCTL_AddItem( pMe->p_MainMenuCtl, MENUCTLTEST_RES_FILE, IDS_MAIN_MENU_TWO, IDS_MAIN_MENU_TWO, NULL, 0);
Rmd中国设计秀
299 IMENUCTL_AddItem( pMe->p_MainMenuCtl, MENUCTLTEST_RES_FILE, IDS_MAIN_MENU_THREE, IDS_MAIN_MENU_THREE, NULL, 0);
Rmd中国设计秀
300 //将中间菜单项在页面中间显示出来
Rmd中国设计秀
301 IMENUCTL_SetActive(pMe->p_MainMenuCtl, TRUE);
Rmd中国设计秀
302 IMENUCTL_Redraw(pMe->p_MainMenuCtl);
Rmd中国设计秀
303 //从数据库读取底部菜单项并添加
Rmd中国设计秀
304 IMENUCTL_AddItem(pMe->p_SoftKeyCtl,MENUCTLTEST_RES_FILE, IDS_SOFT_OK, IDS_SOFT_OK, NULL, 0);
Rmd中国设计秀
305 IMENUCTL_AddItem(pMe->p_SoftKeyCtl,MENUCTLTEST_RES_FILE, IDS_SOFT_EXIT, IDS_SOFT_EXIT, NULL, 0);
Rmd中国设计秀
306 //将底部菜单项在页面底部显示出来
Rmd中国设计秀
307 IMENUCTL_Redraw(pMe->p_SoftKeyCtl);
Rmd中国设计秀
308 IDISPLAY_Update(pMe->a.m_pIDisplay);
Rmd中国设计秀
309 }
Rmd中国设计秀
310
Rmd中国设计秀
311 static void DrawTitle(menuctltest* pMe)
Rmd中国设计秀
312 {
Rmd中国设计秀
313 AEERect rect;
Rmd中国设计秀
314 int x,y;
Rmd中国设计秀
315 //设置显示标题文字的矩形
Rmd中国设计秀
316 SETAEERECT( &rect, 0, 0, pMe->DeviceInfo.cxScreen, MAIN_TITLE_HEIGHT);
Rmd中国设计秀
317 IDISPLAY_FillRect(pMe->a.m_pIDisplay, &rect, TITLE_BACK_COLOR);
Rmd中国设计秀
318 //设置文字显示的左上角坐标
Rmd中国设计秀
319 x = (pMe->DeviceInfo.cxScreen - IDISPLAY_MeasureText( pMe->a.m_pIDisplay, AEE_FONT_BOLD, pMe->p_MainTitle)) / 2;
Rmd中国设计秀
320 y = (MAIN_TITLE_HEIGHT - pMe->r_BlodFontHeight) / 2;
Rmd中国设计秀
321 //将头部标题文字显示出来
Rmd中国设计秀
322 IDISPLAY_DrawText( pMe->a.m_pIDisplay, AEE_FONT_BOLD, pMe->p_MainTitle, -1, x, y, NULL, IDF_TEXT_INVERTED | IDF_TEXT_TRANSPARENT);
Rmd中国设计秀
323 }
Rmd中国设计秀
Rmd中国设计秀
Rmd中国设计秀
Rmd中国设计秀
Rmd中国设计秀
Rmd中国设计秀
Rmd中国设计秀
本程序主要是菜单的显示,对于菜单的操作,下次再发吧!
Rmd中国设计秀
Rmd中国设计秀
Rmd中国设计秀
Rmd中国设计秀
Rmd中国设计秀
Rmd中国设计秀