uCGUIBuilder 3.0 ucGUI可视化编程工具,像VB,C#那样编写ucGUI程序
欢迎大家下载使用,有好的意见或建议可以留言:
已更新3次,各版本特性如下:
version : 3.0.0.0
重写了部分内核,运行更稳定;
支持窗体设计器的复制、粘贴、剪切、删除、撤销、等基本操作;
支持多控件,对齐、公共属性修改等基本操作;
支持将.ucfrm文件与ucGUIBuilder关联功能;
支持控件自定义ID;
添加了窗体预览功能;
添加了对控件事件的支持;
添加了在线检查更新功能;
等……
version : 1.0.0.0
功能很不完善;
还有好多BUG;
目前只能生成资源表;
暂时不能生成其他代码;
version : 2.0.0.5
优化了控件库;
修复了一些Bug;
可以生成完整的C文件(包括 资源表,初始化代码等);
修改了部分功能;
version : 2.1.0.5
优化了控件库;
修复了一些Bug;
代码生成窗口中添加了C语言语法高亮显示功能;
C文件模板做了部分修改
支持设计的窗体保存为文件,并可以打开;
对所有控件属性添加了Description(在属性窗口最下面显示);
窗体布局可以保存,可以自定义为自己喜欢的窗体布局;
修改了部分功能;
ucGUIBuilder
(原文件名:QQ截图20111216002759.png)
生成代码如下:
/*
******************************************************************
** uCGUIBuilder **
** Version: 3.0.0.0 **
** 2011 / 10 **
** CpoyRight to: wyl **
** Email:wyl2008056@163.com **
** This text was Created by uCGUIBuilder **
******************************************************************/
#include <stddef.h>
#include "GUI.h"
#include "DIALOG.h"
//#include "WM.h"
//#include "BUTTON.h"
//#include "CHECKBOX.h"
//#include "DROPDOWN.h"
//#include "EDIT.h"
//#include "FRAMEWIN.h"
//#include "LISTBOX.h"
//#include "MULTIEDIT.h"
//#include "RADIO.h"
//#include "SLIDER.h"
//#include "TEXT.h"
//#include "PROGBAR.h"
//#include "SCROLLBAR.h"
//#include "LISTVIEW.h"
/*********************************************************************
*
* static data
*
**********************************************************************
*/
#define GUI_ID_BUTTON10 GUI_ID_USER+1
/*********************************************************************
*
* Dialog resource
*
* This table conatins the info required to create the dialog.
* It has been created by ucGUIbuilder.
*/
static const GUI_WIDGET_CREATE_INFO _aDialogCreate[] = {
{ FRAMEWIN_CreateIndirect, "Caption", 0, 0, 0, 320,240,FRAMEWIN_CF_MOVEABLE,0},
{ PROGBAR_CreateIndirect, NULL, GUI_ID_PROGBAR0, 19, 185,274,23, 0,0},
{ BUTTON_CreateIndirect, "BUTTON3", GUI_ID_BUTTON10, 44, 38, 75, 23, 0,0},
{ BUTTON_CreateIndirect, "CANCEL", GUI_ID_BUTTON0, 218,78, 75, 23, 0,0},
{ BUTTON_CreateIndirect, "OK", GUI_ID_BUTTON0, 218,38, 75, 23, 0,0}
};
/*****************************************************************
** FunctionName:void InitDialog(WM_MESSAGE * pMsg)
** Function: to initialize the Dialog items
**
** call this function in _cbCallback --> WM_INIT_DIALOG
*****************************************************************/
void InitDialog(WM_MESSAGE * pMsg)
{
WM_HWIN hWin = pMsg->hWin;
//
//FRAMEWIN
//
FRAMEWIN_AddCloseButton(hWin, FRAMEWIN_BUTTON_RIGHT, 0);
FRAMEWIN_AddMaxButton(hWin, FRAMEWIN_BUTTON_RIGHT, 1);
FRAMEWIN_AddMinButton(hWin, FRAMEWIN_BUTTON_RIGHT, 2);
//
//GUI_ID_PROGBAR0
//
PROGBAR_SetBarColor(WM_GetDialogItem(hWin,GUI_ID_PROGBAR0),0,GUI_RED);
PROGBAR_SetBarColor(WM_GetDialogItem(hWin,GUI_ID_PROGBAR0),1,GUI_BLUE);
PROGBAR_SetValue(WM_GetDialogItem(hWin,GUI_ID_PROGBAR0),20);
//
//GUI_ID_BUTTON10
//
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON10),BUTTON_CI_UNPRESSED,GUI_BLUE);
BUTTON_SetBkColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON10),BUTTON_CI_PRESSED,GUI_RED);
BUTTON_SetTextColor(WM_GetDialogItem(hWin,GUI_ID_BUTTON10),BUTTON_CI_UNPRESSED,GUI_RED);
}
/*********************************************************************
*
* Dialog callback routine
*/
static void _cbCallback(WM_MESSAGE * pMsg)
{
int NCode, Id;
WM_HWIN hWin = pMsg->hWin;
switch (pMsg->MsgId)
{
case WM_INIT_DIALOG:
InitDialog(pMsg);
break;
case WM_KEY:
switch (((WM_KEY_INFO*)(pMsg->Data.p))->Key)
{
case GUI_KEY_ESCAPE:
GUI_EndDialog(hWin, 1);
break;
case GUI_KEY_ENTER:
GUI_EndDialog(hWin, 0);
break;
}
break;
case WM_NOTIFY_PARENT:
Id = WM_GetId(pMsg->hWinSrc);
NCode = pMsg->Data.v;
switch (Id)
{
case GUI_ID_OK:
if(NCode==WM_NOTIFICATION_RELEASED)
GUI_EndDialog(hWin, 0);
break;
case GUI_ID_CANCEL:
if(NCode==WM_NOTIFICATION_RELEASED)
GUI_EndDialog(hWin, 0);
break;
case GUI_ID_BUTTON10:
switch(NCode)
{
case WM_NOTIFICATION_CLICKED:
//add codes here
break;
case WM_NOTIFICATION_RELEASED:
//add codes here
break;
case WM_NOTIFICATION_MOVED_OUT:
//add codes here
break;
}
break;
}
break;
default:
WM_DefaultProc(pMsg);
}
}
/*********************************************************************
*
* MainTask
*
**********************************************************************
*/
void MainTask(void)
{
GUI_Init();
WM_SetDesktopColor(GUI_WHITE); /* Automacally update desktop window */
WM_SetCreateFlags(WM_CF_MEMDEV); /* Use memory devices on all windows to avoid flicker */
//PROGBAR_SetDefaultSkin(PROGBAR_SKIN_FLEX);
//FRAMEWIN_SetDefaultSkin(FRAMEWIN_SKIN_FLEX);
//PROGBAR_SetDefaultSkin(PROGBAR_SKIN_FLEX);
//BUTTON_SetDefaultSkin(BUTTON_SKIN_FLEX);
//CHECKBOX_SetDefaultSkin(CHECKBOX_SKIN_FLEX);
//DROPDOWN_SetDefaultSkin(DROPDOWN_SKIN_FLEX);
//SCROLLBAR_SetDefaultSkin(SCROLLBAR_SKIN_FLEX);
//SLIDER_SetDefaultSkin(SLIDER_SKIN_FLEX);
//HEADER_SetDefaultSkin(HEADER_SKIN_FLEX);
//RADIO_SetDefaultSkin(RADIO_SKIN_FLEX);
GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), &_cbCallback, 0, 0, 0);
}
补充内容 (2012-3-27 20:09):
2012年1月4日更新:ucguibuilder3.1:详见43,44楼
回复【楼主位】wyl_wyl
-----------------------------------------------------------------------
欢迎大家下载使用:
链接:https://pan.baidu.com/s/1XcYysAULbi1b1COVnZAmCw
提取码:jnj3
复制这段内容后打开百度 {MOD}手机App,操作更方便哦
一周热门 更多>