[ucgui] 对话框3——GUIBuilder生成界面c文件及修改

 

>_<" 其实生成GUI有相应的工具:

>_<" 将对应的控件布置好之后点击保存,会生成一个c文件,这个c文件要做些修改:

  • 将资源列表里的每一个控件的最后一个参数删掉
  • 将最后一个函数中的: hWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), &_cbDialog, WM_HBKWIN, 0, 0);改为:GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate),&_cbDialog, 0, 0, 0);否则会不出现效果~
  • 再编译出错,就说明少一些文件引入,比如你窗口里有进度条,如果少了#include "..\GUIinc\PROGBAR.h"则会报错!
  1 /*********************************************************************
  2 *                                                                    *
  3 *                SEGGER Microcontroller GmbH & Co. KG                *
  4 *        Solutions for real time microcontroller applications        *
  5 *                                                                    *
  6 **********************************************************************
  7 *                                                                    *
  8 * C-file generated by:                                               *
  9 *                                                                    *
 10 *        GUI_Builder for emWin version 5.12                          *
 11 *        Compiled Jun 29 2011, 15:28:47                              *
 12 *        (c) 2011 Segger Microcontroller GmbH & Co. KG               *
 13 *                                                                    *
 14 **********************************************************************
 15 *                                                                    *
 16 *        Internet: www.segger.com  Support: support@segger.com       *
 17 *                                                                    *
 18 **********************************************************************
 19 */
 20 
 21 // USER START (Optionally insert additional includes)
 22 // USER END
 23 
 24 #include "DIALOG.h"
 25 
 26 /*********************************************************************
 27 *
 28 *       Defines
 29 *
 30 **********************************************************************
 31 */
 32 
 33 #define ID_FRAMEWIN_0   (GUI_ID_USER + 0x0E)
 34 #define ID_TEXT_0   (GUI_ID_USER + 0x10)
 35 #define ID_LISTBOX_0   (GUI_ID_USER + 0x11)
 36 #define ID_LISTVIEW_0   (GUI_ID_USER + 0x12)
 37 #define ID_RADIO_0   (GUI_ID_USER + 0x13)
 38 #define ID_PROGBAR_0   (GUI_ID_USER + 0x14)
 39 #define ID_LISTBOX_1   (GUI_ID_USER + 0x15)
 40 #define ID_CHECKBOX_0   (GUI_ID_USER + 0x17)
 41 #define ID_BUTTON_0   (GUI_ID_USER + 0x18)
 42 #define ID_BUTTON_1   (GUI_ID_USER + 0x19)
 43 #define ID_SLIDER_0   (GUI_ID_USER + 0x1A)
 44 #define ID_EDIT_0   (GUI_ID_USER + 0x1C)
 45 #define ID_CHECKBOX_1   (GUI_ID_USER + 0x1D)
 46 #define ID_CHECKBOX_2   (GUI_ID_USER + 0x1E)
 47 
 48 // USER START (Optionally insert additional defines)
 49 // USER END
 50 
 51 /*********************************************************************
 52 *
 53 *       Static data
 54 *
 55 **********************************************************************
 56 */
 57 
 58 // USER START (Optionally insert additional static data)
 59 // USER END
 60 
 61 /*********************************************************************
 62 *
 63 *       _aDialogCreate
 64 */
 65 static const GUI_WIDGET_CREATE_INFO _aDialogCreate[] = {
 66   { FRAMEWIN_CreateIndirect, "Framewin", ID_FRAMEWIN_0, 0, 0, 800, 480, 0, 0, 0 },
 67   { TEXT_CreateIndirect, "Text", ID_TEXT_0, 44, 176, 80, 20, 0, 0, 0 },
 68   { LISTBOX_CreateIndirect, "Listbox", ID_LISTBOX_0, 283, 10, 146, 150, 0, 0, 0 },
 69   { LISTVIEW_CreateIndirect, "Listview", ID_LISTVIEW_0, 446, 15, 336, 185, 0, 0, 0 },
 70   { RADIO_CreateIndirect, "Radio", ID_RADIO_0, 95, 20, 80, 60, 0, 5122, 0 },
 71   { PROGBAR_CreateIndirect, "Progbar", ID_PROGBAR_0, 228, 375, 282, 20, 0, 0, 0 },
 72   { LISTBOX_CreateIndirect, "Listbox", ID_LISTBOX_1, 632, 215, 144, 179, 0, 0, 0 },
 73   { CHECKBOX_CreateIndirect, "Checkbox", ID_CHECKBOX_0, 8, 29, 80, 19, 0, 0, 0 },
 74   { BUTTON_CreateIndirect, "Button", ID_BUTTON_0, 77, 332, 80, 20, 0, 0, 0 },
 75   { BUTTON_CreateIndirect, "Button", ID_BUTTON_1, 76, 306, 80, 20, 0, 0, 0 },
 76   { SLIDER_CreateIndirect, "Slider", ID_SLIDER_0, 226, 317, 292, 31, 0, 0, 0 },
 77   { EDIT_CreateIndirect, "Edit", ID_EDIT_0, 236, 238, 266, 22, 0, 100, 0 },
 78   { CHECKBOX_CreateIndirect, "Checkbox", ID_CHECKBOX_1, 11, 52, 80, 20, 0, 0, 0 },
 79   { CHECKBOX_CreateIndirect, "Checkbox", ID_CHECKBOX_2, 8, 7, 80, 20, 0, 0, 0 },
 80   // USER START (Optionally insert additional widgets)
 81   // USER END
 82 };
 83 
 84 /*********************************************************************
 85 *
 86 *       Static code
 87 *
 88 **********************************************************************
 89 */
 90 
 91 // USER START (Optionally insert additional static code)
 92 // USER END
 93 
 94 /*********************************************************************
 95 *
 96 *       _cbDialog
 97 */
 98 static void _cbDialog(WM_MESSAGE * pMsg) {
 99   WM_HWIN hItem;
100   int Id, NCode;
101   // USER START (Optionally insert additional variables)
102   // USER END
103 
104   switch (pMsg->MsgId) {
105   case WM_INIT_DIALOG:
106     //
107     // Initialization of 'Listbox'
108     //
109     hItem = WM_GetDialogItem(pMsg->hWin, ID_LISTBOX_0);
110     LISTBOX_AddString(hItem, "Item 0");
111     LISTBOX_AddString(hItem, "Item 1");
112     LISTBOX_AddString(hItem, "Item 2");
113     //
114     // Initialization of 'Listview'
115     //
116     hItem = WM_GetDialogItem(pMsg->hWin, ID_LISTVIEW_0);
117     LISTVIEW_AddColumn(hItem, 30, "Col 0", GUI_TA_HCENTER | GUI_TA_VCENTER);
118     LISTVIEW_AddColumn(hItem, 30, "Col 1", GUI_TA_HCENTER | GUI_TA_VCENTER);
119     LISTVIEW_AddColumn(hItem, 30, "Col 2", GUI_TA_HCENTER | GUI_TA_VCENTER);
120     LISTVIEW_AddRow(hItem, NULL);
121     LISTVIEW_SetGridVis(hItem, 1);
122     LISTVIEW_SetItemBkColor(hItem, 0, 0, LISTVIEW_CI_UNSEL, 0x00FFFFFF);
123     //
124     // Initialization of 'Listbox'
125     //
126     hItem = WM_GetDialogItem(pMsg->hWin, ID_LISTBOX_1);
127     LISTBOX_AddString(hItem, "Item 0");
128     LISTBOX_AddString(hItem, "Item 1");
129     LISTBOX_AddString(hItem, "Item 2");
130     //
131     // Initialization of 'Checkbox'
132     //
133     hItem = WM_GetDialogItem(pMsg->hWin, ID_CHECKBOX_0);
134     CHECKBOX_SetText(hItem, "Check");
135     //
136     // Initialization of 'Edit'
137     //
138     hItem = WM_GetDialogItem(pMsg->hWin, ID_EDIT_0);
139     EDIT_SetText(hItem, "123");
140     //
141     // Initialization of 'Checkbox'
142     //
143     hItem = WM_GetDialogItem(pMsg->hWin, ID_CHECKBOX_1);
144     CHECKBOX_SetText(hItem, "Check");
145     //
146     // Initialization of 'Checkbox'
147     //
148     hItem = WM_GetDialogItem(pMsg->hWin, ID_CHECKBOX_2);
149     CHECKBOX_SetText(hItem, "Check");
150     // USER START (Optionally insert additional code for further widget initialization)
151     // USER END
152     break;
153   case WM_NOTIFY_PARENT:
154     Id    = WM_GetId(pMsg->hWinSrc);
155     NCode = pMsg->Data.v;
156     switch(Id) {
157     case ID_LISTBOX_0: // Notifications sent by 'Listbox'
158       switch(NCode) {
159       case WM_NOTIFICATION_CLICKED:
160         // USER START (Optionally insert code for reacting on notification message)
161         // USER END
162         break;
163       case WM_NOTIFICATION_RELEASED:
164         // USER START (Optionally insert code for reacting on notification message)
165         // USER END
166         break;
167       case WM_NOTIFICATION_SEL_CHANGED:
168         // USER START (Optionally insert code for reacting on notification message)
169         // USER END
170         break;
171       // USER START (Optionally insert additional code for further notification handling)
172       // USER END
173       }
174       break;
175     case ID_LISTVIEW_0: // Notifications sent by 'Listview'
176       switch(NCode) {
177       case WM_NOTIFICATION_CLICKED:
178         // USER START (Optionally insert code for reacting on notification message)
179         // USER END
180         break;
181       case WM_NOTIFICATION_RELEASED:
182         // USER START (Optionally insert code for reacting on notification message)
183         // USER END
184         break;
185       case WM_NOTIFICATION_SEL_CHANGED:
186         // USER START (Optionally insert code for reacting on notification message)
187         // USER END
188         break;
189       // USER START (Optionally insert additional code for further notification handling)
190       // USER END
191       }
192       break;
193     case ID_RADIO_0: // Notifications sent by 'Radio'
194       switch(NCode) {
195       case WM_NOTIFICATION_CLICKED:
196         // USER START (Optionally insert code for reacting on notification message)
197         // USER END
198         break;
199       case WM_NOTIFICATION_RELEASED:
200         // USER START (Optionally insert code for reacting on notification message)
201         // USER END
202         break;
203       case WM_NOTIFICATION_VALUE_CHANGED:
204         // USER START (Optionally insert code for reacting on notification message)
205         // USER END
206         break;
207       // USER START (Optionally insert additional code for further notification handling)
208       // USER END
209       }
210       break;
211     case ID_LISTBOX_1: // Notifications sent by 'Listbox'
212       switch(NCode) {
213       case WM_NOTIFICATION_CLICKED:
214         // USER START (Optionally insert code for reacting on notification message)
215         // USER END
216         break;
217       case WM_NOTIFICATION_RELEASED:
218         // USER START (Optionally insert code for reacting on notification message)
219         // USER END
220         break;
221       case WM_NOTIFICATION_SEL_CHANGED:
222         // USER START (Optionally insert code for reacting on notification message)
223         // USER END
224         break;
225       // USER START (Optionally insert additional code for further notification handling)
226       // USER END
227       }
228       break;
229     case ID_CHECKBOX_0: // Notifications sent by 'Checkbox'
230       switch(NCode) {
231       case WM_NOTIFICATION_CLICKED:
232         // USER START (Optionally insert code for reacting on notification message)
233         // USER END
234         break;
235       case WM_NOTIFICATION_RELEASED:
236         // USER START (Optionally insert code for reacting on notification message)
237         // USER END
238         break;
239       case WM_NOTIFICATION_VALUE_CHANGED:
240         // USER START (Optionally insert code for reacting on notification message)
241         // USER END
242         break;
243       // USER START (Optionally insert additional code for further notification handling)
244       // USER END
245       }
246       break;
247     case ID_BUTTON_0: // Notifications sent by 'Button'
248       switch(NCode) {
249       case WM_NOTIFICATION_CLICKED:
250         // USER START (Optionally insert code for reacting on notification message)
251         // USER END
252         break;
253       case WM_NOTIFICATION_RELEASED:
254         // USER START (Optionally insert code for reacting on notification message)
255         // USER END
256         break;
257       // USER START (Optionally insert additional code for further notification handling)
258       // USER END
259       }
260       break;
261     case ID_BUTTON_1: // Notifications sent by 'Button'
262       switch(NCode) {
263       case WM_NOTIFICATION_CLICKED:
264         // USER START (Optionally insert code for reacting on notification message)
265         // USER END
266         break;
267       case WM_NOTIFICATION_RELEASED:
268         // USER START (Optionally insert code for reacting on notification message)
269         // USER END
270         break;
271       // USER START (Optionally insert additional code for further notification handling)
272       // USER END
273       }
274       break;
275     case ID_SLIDER_0: // Notifications sent by 'Slider'
276       switch(NCode) {
277       case WM_NOTIFICATION_CLICKED:
278         // USER START (Optionally insert code for reacting on notification message)
279         // USER END
280         break;
281       case WM_NOTIFICATION_RELEASED:
282         // USER START (Optionally insert code for reacting on notification message)
283         // USER END
284         break;
285       case WM_NOTIFICATION_VALUE_CHANGED:
286         // USER START (Optionally insert code for reacting on notification message)
287         // USER END
288         break;
289       // USER START (Optionally insert additional code for further notification handling)
290       // USER END
291       }
292       break;
293     case ID_EDIT_0: // Notifications sent by 'Edit'
294       switch(NCode) {
295       case WM_NOTIFICATION_CLICKED:
296         // USER START (Optionally insert code for reacting on notification message)
297         // USER END
298         break;
299       case WM_NOTIFICATION_RELEASED:
300         // USER START (Optionally insert code for reacting on notification message)
301         // USER END
302         break;
303       case WM_NOTIFICATION_VALUE_CHANGED:
304         // USER START (Optionally insert code for reacting on notification message)
305         // USER END
306         break;
307       // USER START (Optionally insert additional code for further notification handling)
308       // USER END
309       }
310       break;
311     case ID_CHECKBOX_1: // Notifications sent by 'Checkbox'
312       switch(NCode) {
313       case WM_NOTIFICATION_CLICKED:
314         // USER START (Optionally insert code for reacting on notification message)
315         // USER END
316         break;
317       case WM_NOTIFICATION_RELEASED:
318         // USER START (Optionally insert code for reacting on notification message)
319         // USER END
320         break;
321       case WM_NOTIFICATION_VALUE_CHANGED:
322         // USER START (Optionally insert code for reacting on notification message)
323         // USER END
324         break;
325       // USER START (Optionally insert additional code for further notification handling)
326       // USER END
327       }
328       break;
329     case ID_CHECKBOX_2: // Notifications sent by 'Checkbox'
330       switch(NCode) {
331       case WM_NOTIFICATION_CLICKED:
332         // USER START (Optionally insert code for reacting on notification message)
333         // USER END
334         break;
335       case WM_NOTIFICATION_RELEASED:
336         // USER START (Optionally insert code for reacting on notification message)
337         // USER END
338         break;
339       case WM_NOTIFICATION_VALUE_CHANGED:
340         // USER START (Optionally insert code for reacting on notification message)
341         // USER END
342         break;
343       // USER START (Optionally insert additional code for further notification handling)
344       // USER END
345       }
346       break;
347     // USER START (Optionally insert additional code for further Ids)
348     // USER END
349     }
350     break;
351   // USER START (Optionally insert additional message handling)
352   // USER END
353   default:
354     WM_DefaultProc(pMsg);
355     break;
356   }
357 }
358 
359 /*********************************************************************
360 *
361 *       Public code
362 *
363 **********************************************************************
364 */
365 /*********************************************************************
366 *
367 *       CreateFramewin
368 */
369 WM_HWIN CreateFramewin(void);
370 WM_HWIN CreateFramewin(void) {
371   WM_HWIN hWin;
372 
373   hWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), &_cbDialog, WM_HBKWIN, 0, 0);
374   return hWin;
375 }
376 
377 // USER START (Optionally insert additional public code)
378 // USER END
379 
380 /*************************** End of file ****************************/
生成c文件
>_<" 下面是修改后的c文件,今后采用这种方法就能很快生成想要的界面啦!
  1 #include "..\GUIinc\GUI.h" 
  2 #include "..\GUIinc\LCD_ConfDefaults.h"  /* valid LCD configuration */
  3 #include "..\GUIinc\WM.h"
  4 #include "..\GUIinc\DIALOG.h" 
  5 #include "..\GUIinc\EDIT.h"
  6 #include "..\GUIinc\SLIDER.h"
  7 #include "..\GUIinc\FRAMEWIN.h"
  8 #include "..\GUIinc\MULTIEDIT.h"
  9 #include "..\GUIinc\LISTVIEW.h"    
 10 #include "..\GUIinc\PROGBAR.h"
 11 #include "demo.h"
 12 
 13 #include "DIALOG.h"
 14 
 15 #define ID_FRAMEWIN_0   (GUI_ID_USER + 0x0E)
 16 #define ID_TEXT_0   (GUI_ID_USER + 0x10)
 17 #define ID_LISTBOX_0   (GUI_ID_USER + 0x11)
 18 #define ID_LISTVIEW_0   (GUI_ID_USER + 0x12)
 19 #define ID_RADIO_0   (GUI_ID_USER + 0x13)
 20 #define ID_PROGBAR_0   (GUI_ID_USER + 0x14)
 21 #define ID_LISTBOX_1   (GUI_ID_USER + 0x15)
 22 #define ID_CHECKBOX_0   (GUI_ID_USER + 0x17)
 23 #define ID_BUTTON_0   (GUI_ID_USER + 0x18)
 24 #define ID_BUTTON_1   (GUI_ID_USER + 0x19)
 25 #define ID_SLIDER_0   (GUI_ID_USER + 0x1A)
 26 #define ID_EDIT_0   (GUI_ID_USER + 0x1C)
 27 #define ID_CHECKBOX_1   (GUI_ID_USER + 0x1D)
 28 #define ID_CHECKBOX_2   (GUI_ID_USER + 0x1E)
 29 
 30 // USER START (Optionally insert additional defines)
 31 // USER END
 32 
 33 /*********************************************************************
 34 *
 35 *       Static data
 36 *
 37 **********************************************************************
 38 */
 39 
 40 // USER START (Optionally insert additional static data)
 41 // USER END
 42 
 43 /*********************************************************************
 44 *
 45 *       _aDialogCreate
 46 */
 47 static const GUI_WIDGET_CREATE_INFO _aDialogCreate[] = {
 48   { FRAMEWIN_CreateIndirect, "Framewin", ID_FRAMEWIN_0, 0, 0, 800, 480, 0, 0},
 49   { TEXT_CreateIndirect, "Text", ID_TEXT_0, 44, 176, 80, 20, 0, 0},
 50   { LISTBOX_CreateIndirect, "Listbox", ID_LISTBOX_0, 283, 10, 146, 150, 0, 0},
 51   { LISTVIEW_CreateIndirect, "Listview", ID_LISTVIEW_0, 446, 15, 336, 185, 0, 0},
 52   { RADIO_CreateIndirect, "Radio", ID_RADIO_0, 95, 20, 80, 60, 0, 5122},
 53   { PROGBAR_CreateIndirect, "Progbar", ID_PROGBAR_0, 228, 375, 282, 20, 0, 0},
 54   { LISTBOX_CreateIndirect, "Listbox", ID_LISTBOX_1, 632, 215, 144, 179, 0, 0},
 55   { CHECKBOX_CreateIndirect, "Checkbox", ID_CHECKBOX_0, 8, 29, 80, 19, 0, 0},
 56   { BUTTON_CreateIndirect, "Button", ID_BUTTON_0, 77, 332, 80, 20, 0, 0},
 57   { BUTTON_CreateIndirect, "Button", ID_BUTTON_1, 76, 306, 80, 20, 0, 0},
 58   { SLIDER_CreateIndirect, "Slider", ID_SLIDER_0, 226, 317, 292, 31, 0, 0},
 59   { EDIT_CreateIndirect, "Edit", ID_EDIT_0, 236, 238, 266, 22, 0, 100},
 60   { CHECKBOX_CreateIndirect, "Checkbox", ID_CHECKBOX_1, 11, 52, 80, 20, 0, 0},
 61   { CHECKBOX_CreateIndirect, "Checkbox", ID_CHECKBOX_2, 8, 7, 80, 20, 0, 0},
 62   // USER START (Optionally insert additional widgets)
 63   // USER END
 64 };
 65 
 66 /*********************************************************************
 67 *
 68 *       Static code
 69 *
 70 **********************************************************************
 71 */
 72 
 73 // USER START (Optionally insert additional static code)
 74 // USER END
 75 
 76 /*********************************************************************
 77 *
 78 *       _cbDialog
 79 */
 80 static void _cbDialog(WM_MESSAGE * pMsg) {
 81   WM_HWIN hItem;
 82   int Id, NCode;
 83   // USER START (Optionally insert additional variables)
 84   // USER END
 85 
 86   switch (pMsg->MsgId) {
 87   case WM_INIT_DIALOG:
 88     //
 89     // Initialization of 'Listbox'
 90     //
 91     hItem = WM_GetDialogItem(pMsg->hWin, ID_LISTBOX_0);
 92     LISTBOX_AddString(hItem, "Item 0");
 93     LISTBOX_AddString(hItem, "Item 1");
 94     LISTBOX_AddString(hItem, "Item 2");
 95     //
 96     // Initialization of 'Listview'
 97     //
 98     hItem = WM_GetDialogItem(pMsg->hWin, ID_LISTVIEW_0);
 99     LISTVIEW_AddColumn(hItem, 30, "Col 0", GUI_TA_HCENTER | GUI_TA_VCENTER);
100     LISTVIEW_AddColumn(hItem, 30, "Col 1", GUI_TA_HCENTER | GUI_TA_VCENTER);
101     LISTVIEW_AddColumn(hItem, 30, "Col 2", GUI_TA_HCENTER | GUI_TA_VCENTER);
102     LISTVIEW_AddRow(hItem, NULL);
103     LISTVIEW_SetGridVis(hItem, 1);
104     LISTVIEW_SetItemBkColor(hItem, 0, 0, LISTVIEW_CI_UNSEL, 0x00FFFFFF);
105     //
106     // Initialization of 'Listbox'
107     //
108     hItem = WM_GetDialogItem(pMsg->hWin, ID_LISTBOX_1);
109     LISTBOX_AddString(hItem, "Item 0");
110     LISTBOX_AddString(hItem, "Item 1");
111     LISTBOX_AddString(hItem, "Item 2");
112     //
113     // Initialization of 'Checkbox'
114     //
115     hItem = WM_GetDialogItem(pMsg->hWin, ID_CHECKBOX_0);
116     CHECKBOX_SetText(hItem, "Check");
117     //
118     // Initialization of 'Edit'
119     //
120     hItem = WM_GetDialogItem(pMsg->hWin, ID_EDIT_0);
121     EDIT_SetText(hItem, "123");
122     //
123     // Initialization of 'Checkbox'
124     //
125     hItem = WM_GetDialogItem(pMsg->hWin, ID_CHECKBOX_1);
126     CHECKBOX_SetText(hItem, "Check");
127     //
128     // Initialization of 'Checkbox'
129     //
130     hItem = WM_GetDialogItem(pMsg->hWin, ID_CHECKBOX_2);
131     CHECKBOX_SetText(hItem, "Check");
132     // USER START (Optionally insert additional code for further widget initialization)
133     // USER END
134     break;
135   case WM_NOTIFY_PARENT:
136     Id    = WM_GetId(pMsg->hWinSrc);
137     NCode = pMsg->Data.v;
138     switch(Id) {
139     case ID_LISTBOX_0: // Notifications sent by 'Listbox'
140       switch(NCode) {
141       case WM_NOTIFICATION_CLICKED:
142         // USER START (Optionally insert code for reacting on notification message)
143         // USER END
144         break;
145       case WM_NOTIFICATION_RELEASED:
146         // USER START (Optionally insert code for reacting on notification message)
147         // USER END
148         break;
149       case WM_NOTIFICATION_SEL_CHANGED:
150         // USER START (Optionally insert code for reacting on notification message)
151         // USER END
152         break;
153       // USER START (Optionally insert additional code for further notification handling)
154       // USER END
155       }
156       break;
157     case ID_LISTVIEW_0: // Notifications sent by 'Listview'
158       switch(NCode) {
159       case WM_NOTIFICATION_CLICKED:
160         // USER START (Optionally insert code for reacting on notification message)
161         // USER END
162         break;
163       case WM_NOTIFICATION_RELEASED:
164         // USER START (Optionally insert code for reacting on notification message)
165         // USER END
166         break;
167       case WM_NOTIFICATION_SEL_CHANGED:
168         // USER START (Optionally insert code for reacting on notification message)
169         // USER END
170         break;
171       // USER START (Optionally insert additional code for further notification handling)
172       // USER END
173       }
174       break;
175     case ID_RADIO_0: // Notifications sent by 'Radio'
176       switch(NCode) {
177       case WM_NOTIFICATION_CLICKED:
178         // USER START (Optionally insert code for reacting on notification message)
179         // USER END
180         break;
181       case WM_NOTIFICATION_RELEASED:
182         // USER START (Optionally insert code for reacting on notification message)
183         // USER END
184         break;
185       case WM_NOTIFICATION_VALUE_CHANGED:
186         // USER START (Optionally insert code for reacting on notification message)
187         // USER END
188         break;
189       // USER START (Optionally insert additional code for further notification handling)
190       // USER END
191       }
192       break;
193     case ID_LISTBOX_1: // Notifications sent by 'Listbox'
194       switch(NCode) {
195       case WM_NOTIFICATION_CLICKED:
196         // USER START (Optionally insert code for reacting on notification message)
197         // USER END
198         break;
199       case WM_NOTIFICATION_RELEASED:
200         // USER START (Optionally insert code for reacting on notification message)
201         // USER END
202         break;
203       case WM_NOTIFICATION_SEL_CHANGED:
204         // USER START (Optionally insert code for reacting on notification message)
205         // USER END
206         break;
207       // USER START (Optionally insert additional code for further notification handling)
208       // USER END
209       }
210       break;
211     case ID_CHECKBOX_0: // Notifications sent by 'Checkbox'
212       switch(NCode) {
213       case WM_NOTIFICATION_CLICKED:
214         // USER START (Optionally insert code for reacting on notification message)
215         // USER END
216         break;
217       case WM_NOTIFICATION_RELEASED:
218         // USER START (Optionally insert code for reacting on notification message)
219         // USER END
220         break;
221       case WM_NOTIFICATION_VALUE_CHANGED:
222         // USER START (Optionally insert code for reacting on notification message)
223         // USER END
224         break;
225       // USER START (Optionally insert additional code for further notification handling)
226       // USER END
227       }
228       break;
229     case ID_BUTTON_0: // Notifications sent by 'Button'
230       switch(NCode) {
231       case WM_NOTIFICATION_CLICKED:
232         // USER START (Optionally insert code for reacting on notification message)
233         // USER END
234         break;
235       case WM_NOTIFICATION_RELEASED:
236         // USER START (Optionally insert code for reacting on notification message)
237         // USER END
238         break;
239       // USER START (Optionally insert additional code for further notification handling)
240       // USER END
241       }
242       break;
243     case ID_BUTTON_1: // Notifications sent by 'Button'
244       switch(NCode) {
245       case WM_NOTIFICATION_CLICKED:
246         // USER START (Optionally insert code for reacting on notification message)
247         // USER END
248         break;
249       case WM_NOTIFICATION_RELEASED:
250         // USER START (Optionally insert code for reacting on notification message)
251         // USER END
252         break;
253       // USER START (Optionally insert additional code for further notification handling)
254       // USER END
255       }
256       break;
257     case ID_SLIDER_0: // Notifications sent by 'Slider'
258       switch(NCode) {
259       case WM_NOTIFICATION_CLICKED:
260         // USER START (Optionally insert code for reacting on notification message)
261         // USER END
262         break;
263       case WM_NOTIFICATION_RELEASED:
264         // USER START (Optionally insert code for reacting on notification message)
265         // USER END
266         break;
267       case WM_NOTIFICATION_VALUE_CHANGED:
268         // USER START (Optionally insert code for reacting on notification message)
269         // USER END
270         break;
271       // USER START (Optionally insert additional code for further notification handling)
272       // USER END
273       }
274       break;
275     case ID_EDIT_0: // Notifications sent by 'Edit'
276       switch(NCode) {
277       case WM_NOTIFICATION_CLICKED:
278         // USER START (Optionally insert code for reacting on notification message)
279         // USER END
280         break;
281       case WM_NOTIFICATION_RELEASED:
282         // USER START (Optionally insert code for reacting on notification message)
283         // USER END
284         break;
285       case WM_NOTIFICATION_VALUE_CHANGED:
286         // USER START (Optionally insert code for reacting on notification message)
287         // USER END
288         break;
289       // USER START (Optionally insert additional code for further notification handling)
290       // USER END
291       }
292       break;
293     case ID_CHECKBOX_1: // Notifications sent by 'Checkbox'
294       switch(NCode) {
295       case WM_NOTIFICATION_CLICKED:
296         // USER START (Optionally insert code for reacting on notification message)
297         // USER END
298         break;
299       case WM_NOTIFICATION_RELEASED:
300         // USER START (Optionally insert code for reacting on notification message)
301         // USER END
302         break;
303       case WM_NOTIFICATION_VALUE_CHANGED:
304         // USER START (Optionally insert code for reacting on notification message)
305         // USER END
306         break;
307       // USER START (Optionally insert additional code for further notification handling)
308       // USER END
309       }
310       break;
311     case ID_CHECKBOX_2: // Notifications sent by 'Checkbox'
312       switch(NCode) {
313       case WM_NOTIFICATION_CLICKED:
314         // USER START (Optionally insert code for reacting on notification message)
315         // USER END
316         break;
317       case WM_NOTIFICATION_RELEASED:
318         // USER START (Optionally insert code for reacting on notification message)
319         // USER END
320         break;
321       case WM_NOTIFICATION_VALUE_CHANGED:
322         // USER START (Optionally insert code for reacting on notification message)
323         // USER END
324         break;
325       // USER START (Optionally insert additional code for further notification handling)
326       // USER END
327       }
328       break;
329     // USER START (Optionally insert additional code for further Ids)
330     // USER END
331     }
332     break;
333   // USER START (Optionally insert additional message handling)
334   // USER END
335   default:
336     WM_DefaultProc(pMsg);
337     break;
338   }
339 }
340 /*************************** End of file ****************************/
341 
342 /*********************************************************************
343 *
344 * MainTask
345 */
346 void Fun(void) {
347   GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate),&_cbDialog, 0, 0, 0);
348 }
349 /*
350 创建对话框后,所有资源表中的小工具都将可见。尽管这些小工具在上面的屏幕截图中可见,但它们
351 是以 “空”的形式出现的。这是因为对话框过程函数尚未包含初始化单个元素的代码。小工具的初始
352 值、由它们所引起的行为以及它们之间的交互作用都需要在对话框过程中进行定义。
353 */

 

posted @ 2014-08-23 04:19  beautifulzzzz  阅读(3065)  评论(0编辑  收藏  举报