hello.c
来自「这里面有UCGUI的源码。对UCGUI介绍比较详细」· C语言 代码 · 共 51 行
C
51 行
#include <mem.h>
#include "gui.h"
USER_PRO MainWin(HAND hd,MESSAGE msg)
{
if(msg.type == GM_SYSTEM)
switch(msg.message)
{
case GM_Create:
CreateObject(hd,TEXTBOX,1,1,"",10,30,120,50,NULL,NULL);
CreateObject(hd,BUTTON,11,1,"asdf",11,70,120,90,NULL,NULL);
CreateObject(hd,BUTTON,12,1,"asdf",12,110,120,130,NULL,NULL);
CreateObject(hd,EDITBOX,13,1,"",10,140,150,200,NULL,NULL);
return;
default:return;
}
if(msg.type == GM_COMMAND)
switch(msg.message)
{
case 11: return;
default:return;
}
if(msg.type == GM_CTRL&&msg.message == GM_TextChange)
switch(msg.icode)
{
case 1:
return;
case 13:
{
char buf[300];
HAND hc=(HAND)msg.jcode;
memset(buf,0,300);
efEditBox->LineText(hc,1,buf);
}
return;
default:return;
}
if(msg.type == GM_KEY && msg.message == GM_KeyDown)
{
}
}
int gmain(void*data)
{
CreateObject(0,MAINWINDOW,1,1,"Hello,World",10,10,400,400,MainWin,data);
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?