|
ecurb2006
中级用户
   www.ecgui.com
积分 272
发帖 123
注册 2006-9-23
状态 离线
|
『第 76 楼』:
re:zqlcch
使用 LLM 解释/回答一下
经过测试,现在已经很棒了!!
谢谢!
MsgBox函数ecurb2006兄偷懒了,为啥按钮显示的是YESNOONCANCEL而不是中文,当然,这个问题是小事
好的.修改一下.
最后一个:给控件加上热键功能吧,像其他GUI库那样,可以由用户指定。。比如按Alt+A是按按钮XX,按Alt+L是某列表框获得焦点等等............当然,这也可以用变通用方法解决,但会增加使用者的开发的时间。。。。
好的.会加上的.
非常感谢 zqlcch 的仔细测试!!
(我MSN:ecurb2006@hotmail.com,经常交流!)
Last edited by ecurb2006 on 2007-8-23 at 12:15 PM ]
After testing, it's already great!!
Thanks!
Brother ecurb2006 was lazy with the MsgBox function. Why does the button display YESNOONCANCEL instead of Chinese? Of course, this problem is trivial.
Okay. I'll make a modification.
The last one: Add hotkey functionality to the controls, like other GUI libraries, where users can specify. For example, pressing Alt+A clicks button XX, pressing Alt+L gives focus to a certain list box, etc. ............Of course, this can also be solved with a workaround, but it will increase the development time for users...
Okay. It will be added.
Thanks a lot to zqlcch for the careful testing!!
(My MSN:ecurb2006@hotmail.com, often communicate!)
Last edited by ecurb2006 on 2007-8-23 at 12:15 PM ]
|

eCGUI-微型嵌入式GUI/ DOS/Linux/uC/OS-II/等 图形界面开发
www.ecgui.com
|
|
2007-8-23 12:14 |
|
|
ecurb2006
中级用户
   www.ecgui.com
积分 272
发帖 123
注册 2006-9-23
状态 离线
|
『第 77 楼』:
使用 LLM 解释/回答一下
继续提:SelBox有BUG,对某个项目双击会使选中的蓝条消失,但实际还是选中的。。。SelBox不支持键盘操作。
OK. i will do it tonight.
Continue to mention: SelBox has a bug. Double-clicking a certain item will make the selected blue bar disappear, but it is actually still selected... SelBox does not support keyboard operations.
OK. i will do it tonight.
|

eCGUI-微型嵌入式GUI/ DOS/Linux/uC/OS-II/等 图形界面开发
www.ecgui.com
|
|
2007-8-23 12:15 |
|
|
ecurb2006
中级用户
   www.ecgui.com
积分 272
发帖 123
注册 2006-9-23
状态 离线
|
『第 78 楼』:
综合例子1
使用 LLM 解释/回答一下
/*
Example_1 - 对话窗口,按钮,文本编辑框 综合应用
使用自定义数据,SetObjVar,GetObjVar进行对象之间的信息交互
www.ecub2006.com
*/
#include "gui.h"
typedef struct _MyWinData /* 自定义数据 */
{
char buf; /* 用保存文本框的内容 */
HAND dlg_button;/* 对话窗口的OK按钮句柄*/
HAND dlg_textbox;/* 对话窗口的文本框句柄*/
}MyWinData,*PMyWinData;
void MyDialog(HAND hd,MESSAGE msg) /* 对话窗口的消息处理函数 */
{
PMyWinData pWin;/* 自定义数据的指针 */
HAND hdd=GetObjHost(hd); /* 获得主窗口的句柄*/
pWin=GetObjVar(hdd);/* 获得自定义数据 */
if(!pWin) return; /* 错误返回 */
if(msg.type == GM_SYSTEM) /* 系统类消息*/
switch(msg.message)
{
case GM_Create:/* 创建文本框*/
pWin->dlg_textbox=CreateObject(hd,TEXTBOX,4,1,"",10,40,150,60,0,0);
/* 创建按钮 */
pWin->dlg_button=CreateObject(hd,BUTTON,5,1,"OK",70,70,170,90,0,0);
return;
case GM_Destroy:
return;
default:
return;
}
if(msg.type == GM_COMMAND)/* 按钮消息*/
switch(msg.message)
{
case 5:/* OK按钮 */
efTextBox->Text(pWin->dlg_textbox,pWin->buf);/* 复制文本内容到buf*/
efDialogWin->Quit(hd);/* 退出对话窗口 */
return;
default:
return;
}
}
void MyWin(HAND hd,MESSAGE msg)/* 主窗口消息处理函数 */
{
PMyWinData pWin;/* 自定义数据结构指针 */
if(msg.type == GM_SYSTEM) /* 系统类消息*/
switch(msg.message)
{
case GM_Create:
{
/* 分配内存空间 */
pWin=(PMyWinData)Gmalloc(sizeof(MyWinData),"");
SetObjVar(hd,pWin);/* 设定对象的自定义数据 */
/* 创建按钮 */
CreateObject(hd,BUTTON,1,1,"输入",10,40,110,65,0,0);
CreateObject(hd,BUTTON,2,1,"显示",10,70,110,95,0,0);
}
return;
case GM_Destroy:
{
pWin=GetObjVar(hd);/* 获得自定义数据 */
Gfree(pWin,sizeof(MyWinData));/* 释放内存空间 */
}
return;
default:
return;
}
pWin=GetObjVar(hd);/* 获得自定义数据 */
if(!pWin) return;
if(msg.type == GM_COMMAND)
switch(msg.message)
{
case 1:/* 启动一个对话窗口 */
efDialogWin->Start(hd,3,1,"输入-对话窗口",10,40,200,140,MyDialog,0);
return;
case 2:/* 消息窗口 */
MessageBox(hd,"信息",pWin->buf,MB_OK);
return;
default:
return;
}
}
int gmain(void *data)
{
/* 创建窗口 */
CreateObject(0,MAINWINDOW,1,1,"Ex1",10,10,630,300,MyWin,data);
return 0;
}
/*
Example_1 - Dialogue window, button, text edit box comprehensive application
Using custom data, SetObjVar, GetObjVar for information interaction between objects
www.ecub2006.com
*/
#include "gui.h"
typedef struct _MyWinData /* Custom data */
{
char buf; /* Used to save the content of the text box */
HAND dlg_button;/* Handle of the OK button in the dialogue window */
HAND dlg_textbox;/* Handle of the text box in the dialogue window */
}MyWinData,*PMyWinData;
void MyDialog(HAND hd,MESSAGE msg) /* Message processing function for the dialogue window */
{
PMyWinData pWin;/* Pointer to custom data */
HAND hdd=GetObjHost(hd); /* Get the handle of the main window */
pWin=GetObjVar(hdd);/* Get custom data */
if(!pWin) return; /* Error return */
if(msg.type == GM_SYSTEM) /* System class message */
switch(msg.message)
{
case GM_Create:/* Create text box */
pWin->dlg_textbox=CreateObject(hd,TEXTBOX,4,1,"",10,40,150,60,0,0);
/* Create button */
pWin->dlg_button=CreateObject(hd,BUTTON,5,1,"OK",70,70,170,90,0,0);
return;
case GM_Destroy:
return;
default:
return;
}
if(msg.type == GM_COMMAND)/* Button message */
switch(msg.message)
{
case 5:/* OK button */
efTextBox->Text(pWin->dlg_textbox,pWin->buf);/* Copy text content to buf */
efDialogWin->Quit(hd);/* Quit the dialogue window */
return;
default:
return;
}
}
void MyWin(HAND hd,MESSAGE msg)/* Main window message processing function */
{
PMyWinData pWin;/* Pointer to custom data structure */
if(msg.type == GM_SYSTEM) /* System class message */
switch(msg.message)
{
case GM_Create:
{
/* Allocate memory space */
pWin=(PMyWinData)Gmalloc(sizeof(MyWinData),"");
SetObjVar(hd,pWin);/* Set the custom data of the object */
/* Create button */
CreateObject(hd,BUTTON,1,1,"Input",10,40,110,65,0,0);
CreateObject(hd,BUTTON,2,1,"Display",10,70,110,95,0,0);
}
return;
case GM_Destroy:
{
pWin=GetObjVar(hd);/* Get custom data */
Gfree(pWin,sizeof(MyWinData));/* Free memory space */
}
return;
default:
return;
}
pWin=GetObjVar(hd);/* Get custom data */
if(!pWin) return;
if(msg.type == GM_COMMAND)
switch(msg.message)
{
case 1:/* Start a dialogue window */
efDialogWin->Start(hd,3,1,"Input-Dialog Window",10,40,200,140,MyDialog,0);
return;
case 2:/* Message window */
MessageBox(hd,"Information",pWin->buf,MB_OK);
return;
default:
return;
}
}
int gmain(void *data)
{
/* Create window */
CreateObject(0,MAINWINDOW,1,1,"Ex1",10,10,630,300,MyWin,data);
return 0;
}
|

eCGUI-微型嵌入式GUI/ DOS/Linux/uC/OS-II/等 图形界面开发
www.ecgui.com
|
|
2007-8-23 12:37 |
|
|
zqlcch
初级用户
 
积分 178
发帖 85
注册 2006-7-6
状态 离线
|
|
2007-8-25 22:37 |
|
|
ecurb2006
中级用户
   www.ecgui.com
积分 272
发帖 123
注册 2006-9-23
状态 离线
|
『第 80 楼』:
Dialog- 使用对话窗口,需要注意的地方。
使用 LLM 解释/回答一下
/*
Dialog- 使用对话窗口,需要注意的地方。
http://www.ecurb2006. com
当style 为 1 时,
如 : CreateObject(0,MAINWINDOW,1,1,"Test",20,40,620,440,MyWin,0);
当对话窗口类的消息处理函数收到GM_Close时,回自动关闭窗口,销毁窗口。
需要说明的是,GUI的消息分发机制是
先将消息发送要对象类的消息函数,
再发送到对象的消息处理函数。
在这种情况下,产生GM_Close ,先发送对象类消息处理函数,
因为style为1,自动关闭窗口,销毁对象,会产生新的GM_Destroy消息。
这时,对象类的消息处理部分结束。(主窗口MAINWINDOW与对话窗口Dialog style 效果相同)
根据消息分发机制,这时对象的消息处理函数才收到GM_Close,接着收到GM_Destroy消息。
所以会造成 先收到 GM_Destroy 消息,再收到 GM_Close 消息。
这样会不会造成错误呢 ?答案是,只要正确使用就不会出问题。
如果希望接受GM_Close,再判断是否退出 对话窗口,只需将 style 设置为 3 就可以了。
当 style 为2 时,对话窗口类的消息处理函数,不处理GM_Close消息。
所以这时,在对话窗口的消息消息处理函数中,GM_Close 中使用 efDialogWin->Quit(HAND);来退出就可以了,
如果没有使用,那么对话窗口就不会退出,也不会销毁。
调用efDialogWin->Quit(HAND)后,会产生GM_Destroy消息。
可以修改下面这个例子中的style 值(第76行),来观察实际运行效果,更明确的理解如果使用对话窗口。
所以说,开始一个对话窗口后,GM_Create,GM_Destroy 只会产生一次。
当style 为2的时候,GM_Close 有可能多次产生(没有调用efDialogWin->Quit(HAND);来退出)
这样,当创建了分配空间,建立私有数据时,请在 GM_Create 里分配空间,在 GM_Destroy 里销毁(释放).
*/
#include "../gui.h"
void MyDialog(HAND hd,MESSAGE msg)
{
void *buf;
if(msg.type == GM_SYSTEM)
switch(msg.message)
{
case GM_Create:
MessageBox(hd,"GM_SYSTEM","GM_Create",0);
return;
case GM_Destroy:
MessageBox(hd,"GM_SYSTEM","GM_Destroy",0);
return;
case GM_Close:
MessageBox(hd,"GM_SYSTEM","GM_Close",0);
return;
default:
return;
}
}
void MyWin(HAND hd,MESSAGE msg)
{
if(msg.type == GM_SYSTEM)
switch(msg.message)
{
case GM_Create:
CreateObject(hd,BUTTON,1,1,"Dialog",10,50,210,75,0,0);
return;
case GM_Destroy:
return;
default:
return;
}
if(msg.type == GM_COMMAND)
switch(msg.message)
{
case 1:/* 可以修改下面的style 值,来观察实际运行效果,更明确的理解如果使用对话窗口。 */
efDialogWin->Start(hd,1,1,"MyDialog",10,30,180,200,MyDialog,0);
/* efDialogWin->Start(hd,1,2,"MyDialog",10,30,180,200,MyDialog,0); */
return;
case 2:
return;
default:
return;
}
}
int gmain(void *data)
{
CreateObject(0,MAINWINDOW,1,1,"Test",20,40,620,440,MyWin,0);
return 0;
}
/*
Dialog - When using a dialog window, points to note.
http://www.ecurb2006. com
When style is 1,
For example: CreateObject(0,MAINWINDOW,1,1,"Test",20,40,620,440,MyWin,0);
When the message processing function of the dialog window class receives GM_Close, the window will be automatically closed and destroyed.
It should be noted that the message distribution mechanism of the GUI is
First send the message to the message function of the object class,
Then send it to the message processing function of the object.
In this case, GM_Close is generated. First, send it to the object class message processing function.
Because style is 1, the window is automatically closed and the object is destroyed, and a new GM_Destroy message will be generated.
At this time, the object class message processing part ends. (The main window MAINWINDOW has the same effect as the dialog window Dialog style)
According to the message distribution mechanism, then the message processing function of the object receives GM_Close, and then receives the GM_Destroy message.
So there will be a situation where GM_Destroy message is received first, and then GM_Close message is received.
Will this cause errors? The answer is that as long as it is used correctly, there will be no problems.
If you want to receive GM_Close and then judge whether to exit the dialog window, you only need to set style to 3.
When style is 2, the message processing function of the dialog window class does not process the GM_Close message.
At this time, in the message processing function of the dialog window, you can use efDialogWin->Quit(HAND); to exit in GM_Close.
If not used, then the dialog window will not exit and will not be destroyed.
After calling efDialogWin->Quit(HAND), a GM_Destroy message will be generated.
You can modify the style value (line 76) in the following example to observe the actual operation effect and more clearly understand how to use the dialog window.
So, after starting a dialog window, GM_Create and GM_Destroy will only be generated once.
When style is 2, GM_Close may be generated multiple times (if efDialogWin->Quit(HAND); is not called to exit)
In this way, when allocating space and establishing private data, please allocate space in GM_Create and destroy (release) in GM_Destroy.
*/
#include "../gui.h"
void MyDialog(HAND hd,MESSAGE msg)
{
void *buf;
if(msg.type == GM_SYSTEM)
switch(msg.message)
{
case GM_Create:
MessageBox(hd,"GM_SYSTEM","GM_Create",0);
return;
case GM_Destroy:
MessageBox(hd,"GM_SYSTEM","GM_Destroy",0);
return;
case GM_Close:
MessageBox(hd,"GM_SYSTEM","GM_Close",0);
return;
default:
return;
}
}
void MyWin(HAND hd,MESSAGE msg)
{
if(msg.type == GM_SYSTEM)
switch(msg.message)
{
case GM_Create:
CreateObject(hd,BUTTON,1,1,"Dialog",10,50,210,75,0,0);
return;
case GM_Destroy:
return;
default:
return;
}
if(msg.type == GM_COMMAND)
switch(msg.message)
{
case 1:/* You can modify the style value below to observe the actual operation effect and more clearly understand how to use the dialog window. */
efDialogWin->Start(hd,1,1,"MyDialog",10,30,180,200,MyDialog,0);
/* efDialogWin->Start(hd,1,2,"MyDialog",10,30,180,200,MyDialog,0); */
return;
case 2:
return;
default:
return;
}
}
int gmain(void *data)
{
CreateObject(0,MAINWINDOW,1,1,"Test",20,40,620,440,MyWin,0);
return 0;
}
|

eCGUI-微型嵌入式GUI/ DOS/Linux/uC/OS-II/等 图形界面开发
www.ecgui.com
|
|
2007-8-28 17:22 |
|
|
ecurb2006
中级用户
   www.ecgui.com
积分 272
发帖 123
注册 2006-9-23
状态 离线
|
|
2007-9-9 21:36 |
|
|
agang220
初级用户
 
积分 39
发帖 20
注册 2007-9-11
状态 离线
|
|
2007-9-11 17:12 |
|
|
dongyongqiang
新手上路

积分 10
发帖 5
注册 2007-12-5
状态 离线
|
|
2007-12-6 21:13 |
|
|
maclover815
初级用户
 
积分 92
发帖 47
注册 2007-12-7
状态 离线
|
『第 84 楼』:
强
使用 LLM 解释/回答一下
支持一下,继续努力
Give it a support, keep up the good work
|
|
2007-12-13 22:29 |
|
|
ipc185
新手上路

积分 19
发帖 6
注册 2006-12-26
状态 离线
|
『第 85 楼』:
网站打不开了???
使用 LLM 解释/回答一下
网站打不开了???
也无法下载,有新的下载地点吗?
谢谢!
The website can't be opened???
Also can't download, is there a new download location?
Thanks!
|
|
2007-12-20 13:22 |
|
|
ecurb2006
中级用户
   www.ecgui.com
积分 272
发帖 123
注册 2006-9-23
状态 离线
|
|
2007-12-21 21:39 |
|
|
ecurb2006
中级用户
   www.ecgui.com
积分 272
发帖 123
注册 2006-9-23
状态 离线
|
『第 87 楼』:
使用 LLM 解释/回答一下
微型嵌入式GUI - 归来!
正式启用新域名:
www.ecgui.com
即将推出新版本! eCGUI 1.0 Beta.
欢迎关注!
Miniature Embedded GUI - Back!
The official new domain name is activated:
www.ecgui.com
The new version is about to be launched! eCGUI 1.0 Beta.
Welcome to follow!
|

eCGUI-微型嵌入式GUI/ DOS/Linux/uC/OS-II/等 图形界面开发
www.ecgui.com
|
|
2008-9-5 20:11 |
|
|
ecurb2006
中级用户
   www.ecgui.com
积分 272
发帖 123
注册 2006-9-23
状态 离线
|
|
2008-9-11 22:47 |
|
|
ecurb2006
中级用户
   www.ecgui.com
积分 272
发帖 123
注册 2006-9-23
状态 离线
|
『第 89 楼』:
使用 LLM 解释/回答一下
上面的链接提供的库,是最新,最稳定的版本。
稍后,将推出带中文拼音输入法的库(在演示程序里有:)
The library provided by the above link is the latest and most stable version. Later, a library with Chinese Pinyin input method will be launched (in the demo program: )
|

eCGUI-微型嵌入式GUI/ DOS/Linux/uC/OS-II/等 图形界面开发
www.ecgui.com
|
|
2008-9-12 00:15 |
|
|
ecurb2006
中级用户
   www.ecgui.com
积分 272
发帖 123
注册 2006-9-23
状态 离线
|
|
2008-9-18 20:07 |
|
|