China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-26 01:46
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » 100KB DOS Graphics Interface Development (Borland/DJGPP Library) DigestI View 41,851 Replies 111
Floor 76 Posted 2007-08-23 12:14 ·  中国 辽宁 大连 甘井子区 电信
中级用户
★★
www.ecgui.com
Credits 272
Posts 123
Joined 2006-09-23 07:38
19-year member
UID 63446
Status Offline
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
Floor 77 Posted 2007-08-23 12:15 ·  中国 辽宁 大连 甘井子区 电信
中级用户
★★
www.ecgui.com
Credits 272
Posts 123
Joined 2006-09-23 07:38
19-year member
UID 63446
Status Offline
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
Floor 78 Posted 2007-08-23 12:37 ·  中国 辽宁 大连 甘井子区 电信
中级用户
★★
www.ecgui.com
Credits 272
Posts 123
Joined 2006-09-23 07:38
19-year member
UID 63446
Status Offline

/*
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
Floor 79 Posted 2007-08-25 22:37 ·  中国 福建 宁德 电信
初级用户
★★
Credits 178
Posts 85
Joined 2006-07-06 15:25
19-year member
UID 58125
Status Offline
Going to install MSN...
Floor 80 Posted 2007-08-28 17:22 ·  中国 辽宁 大连 教育网
中级用户
★★
www.ecgui.com
Credits 272
Posts 123
Joined 2006-09-23 07:38
19-year member
UID 63446
Status Offline

/*
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
Floor 81 Posted 2007-09-09 21:36 ·  中国 辽宁 大连 联通
中级用户
★★
www.ecgui.com
Credits 272
Posts 123
Joined 2006-09-23 07:38
19-year member
UID 63446
Status Offline
http://www.ecurb2006.com/blog/upload/gui4linux.tar.gz

Tested on Red Hat Linux 9, requires Framebuffer support!
eCGUI-微型嵌入式GUI/ DOS/Linux/uC/OS-II/等 图形界面开发
www.ecgui.com
Floor 82 Posted 2007-09-11 17:12 ·  中国 江苏 南京 电信
初级用户
Credits 39
Posts 20
Joined 2007-09-11 11:27
18-year member
UID 97090
Gender Male
Status Offline
Thanks
Floor 83 Posted 2007-12-06 21:13 ·  中国 山西 太原 联通
新手上路
Credits 10
Posts 5
Joined 2007-12-05 22:08
18-year member
UID 104790
Gender Male
Status Offline
Thank you very much!
Floor 84 Posted 2007-12-13 22:29 ·  中国 广东 腾讯云
初级用户
Credits 92
Posts 47
Joined 2007-12-07 13:20
18-year member
UID 104967
Gender Male
Status Offline
Give it a support, keep up the good work
Floor 85 Posted 2007-12-20 13:22 ·  中国 山东 泰安 联通
新手上路
Credits 19
Posts 6
Joined 2006-12-26 09:10
19-year member
UID 74598
Gender Male
Status Offline
The website can't be opened???

Also can't download, is there a new download location?

Thanks!
Floor 86 Posted 2007-12-21 21:39 ·  中国 辽宁 大连 联通
中级用户
★★
www.ecgui.com
Credits 272
Posts 123
Joined 2006-09-23 07:38
19-year member
UID 63446
Status Offline
eCGUI-微型嵌入式GUI/ DOS/Linux/uC/OS-II/等 图形界面开发
www.ecgui.com
Floor 87 Posted 2008-09-05 20:11 ·  中国 辽宁 大连 联通
中级用户
★★
www.ecgui.com
Credits 272
Posts 123
Joined 2006-09-23 07:38
19-year member
UID 63446
Status Offline
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
Floor 88 Posted 2008-09-11 22:47 ·  中国 辽宁 大连 联通
中级用户
★★
www.ecgui.com
Credits 272
Posts 123
Joined 2006-09-23 07:38
19-year member
UID 63446
Status Offline
eCGUI-微型嵌入式GUI/ DOS/Linux/uC/OS-II/等 图形界面开发
www.ecgui.com
Floor 89 Posted 2008-09-12 00:15 ·  中国 辽宁 大连 联通
中级用户
★★
www.ecgui.com
Credits 272
Posts 123
Joined 2006-09-23 07:38
19-year member
UID 63446
Status Offline
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
Floor 90 Posted 2008-09-18 20:07 ·  中国 辽宁 大连 联通
中级用户
★★
www.ecgui.com
Credits 272
Posts 123
Joined 2006-09-23 07:38
19-year member
UID 63446
Status Offline
Version 0.2 is released!

Updated the Pinyin input method!
Achieved fully Chinese (display, input editing) graphical interface operation for DOS applications.

eCGUI Download Center: http://www.ecgui.com/html/ecgui/35.html



eCGUI Download Center: http://www.ecgui.com/html/ecgui/35.html

[ Last edited by ecurb2006 on 2008-9-18 at 08:13 PM ]
eCGUI-微型嵌入式GUI/ DOS/Linux/uC/OS-II/等 图形界面开发
www.ecgui.com
Forum Jump: