[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 */
时间: 2024-10-14 17:39:14

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

基于MVC4+EasyUI的Web开发框架经验总结(14)--自动生成图标样式文件和图标的选择操作

在很多Web系统中,一般都可能提供一些图标的选择,方便配置按钮,菜单等界面元素的图标,从而是Web系统界面看起来更加美观和协调.但是在系统中一般内置的图标样式相对比较有限,而且硬编码写到样式表里面,这样给我们扩展使用有很多的不方便.基于这个原因,我想如果能够独立一个模块,自动根据图标生成图标CSS样式文件,并存储相应的记录到数据库里面,方便我们查询显示,那样我们使用起来就很方便了,最后有了这些数据,只需要做一个通用的图标选择界面,并可以在很多地方重用了.本文正是基于这个思路,开发了一个图标管理模

基于MVC+EasyUI的Web开发框架经验总结(14)--自动生成图标样式文件和图标的选择操作

在很多Web系统中,一般都可能提供一些图标的选择,方便配置按钮,菜单等界面元素的图标,从而是Web系统界面看起来更加美观和协调.但是在系统中一般内置的图标样式相对比较有限,而且硬编码写到样式表里面,这样给我们扩展使用有很多的不方便.基于这个原因,我想如果能够独立一个模块,自动根据图标生成图标CSS样式文件,并存储相应的记录到数据库里面,方便我们查询显示,那样我们使用起来就很方便了,最后有了这些数据,只需要做一个通用的图标选择界面,并可以在很多地方重用了.本文正是基于这个思路,开发了一个图标管理模

VC6.0生成的exe文件图标

以下是我网上收到的方法 我都试过 成功不了 具体说下我遇到的问题 VC6.0生成的exe文件图标是用Icon下几个图标中value值最小的,顺序为IDR_MAINFRAME.IDR_ICONTETYPE.新加的,所以想更改生成的exe文件图标,只要保证图标的value值是Icon下几个图标中最小的就可以了. 如果生成的exe文件不想用VC自带的MFC图标,可以进行如下操作: 方法一.最简单的方法 1.在程序res文件夹下,删除MFC图标文件,加入自己的图标文件:([color=#FF0000][

[深入浅出WP8.1(Runtime)]生成图片和存储生成的图片文件

7.2.3 使用RenderTargetBitmap类生成图片 RenderTargetBitmap类可以将可视化对象转换为位图,也就是说它可以将任意的UIElement以位图的形式呈现.那么我们在实际的编程中通常会利用RenderTargetBitmap类来对UI界面进行截图操作,比如把程序的界面或者某个控件的外观生成一张图片. 使用RenderTargetBitmap类生成图片一般有两种用途,一种是直接把生成的图片在当前的页面上进行展示,还有一种用途是把生成的图片当作文件存储起来,或者通过某

Editplus中如何取消自动生成的bak文件

Editplus是一款很好的文本编辑器,但是默认会生成后缀名为.bak的备份文件,很容易造成文件目录的混乱. 其实可以通过修改参数属性,让Editplus不要生成这种文件,以Editplus3.3.1为例, 去掉create backup file when saving 上的勾就行了. 如何设置EditPlus的默认文件格式.编码方式及制表符 首先,在Tools(工具)下拉后选择Preferences(首选项),弹出首选项对话框. 然后,在下面的对话框中的左侧选择Files设置项,在右侧面板中

[转]ubuntu下整合eclipse和javah生成jni头文件开发android的native程序

转载自:http://blog.csdn.net/jiuyueguang/article/details/9404237 本文介绍两种利用javah命令生成jni头文件的方法,第一种为大众所知的javah命令,第二种为整合javah到eclipse里面.推荐第二种方式,方便快捷,随时修改随时生成 0:前提和条件: 1:ubuntu64位系统 2:android-ndk-r8e已经安装好,并且配置到eclipse里面 3:android-sdk-linux已经安装好,并且配置到eclipse里面

ubuntu下整合eclipse和javah生成jni头文件开发android的native程序(转)

本文介绍两种利用javah命令生成jni头文件的方法,第一种为大众所知的javah命令,第二种为整合javah到eclipse里面.推荐第二种方式,方便快捷,随时修改随时生成 0:前提和条件: 1:ubuntu64位系统 2:android-ndk-r8e已经安装好,并且配置到eclipse里面 3:android-sdk-linux已经安装好,并且配置到eclipse里面 1:第一种命令行模式 1:如图,我的项目结构是这样,我的 如图,采用eclipse自动生成的jni文件夹中,可以看到And

减少服务器压力php生成静态xml文件

一.引 言 在速度上,静态页面要比动态页面的比方php快很多,这是毫无疑问的,但是由于静态页面的灵活性较差,如果不借助数据库或其他的设备保存相关信息的话,整体的管理上比较繁琐,比方修改编辑.比方阅读权限限制等,但是,对应一些我们经常频频使用的文件,比方说,开发的新闻发布系统,我们不希望很多用户都读取数据库才显示结果,这样一方面消耗了服务器的资源,另一方面占去了浏览者大量可贵的响应时间,所有,有了"静态页面话"的做法,当前很多网站都采用这种技术,一般都是由管理后台控制,或者生成html直

生成ks.cfg文件

RHEL 7下生成ks.cfg文件 环境 + RHEL 7 + 字符界面, 没有安装图形界面 软件包安装 + `yum install system-config-kickstart -y` + `yum install gdm -y` # system-config-kickstart是图形程序, 但是我们的环境为字符界面, 需要安装gdm启动图形程序, 这样就无需安装图形界面了 + `yum install httpd -y` # 将光盘挂载到/var/www/html/yumrepo目录下