#pragma comment(lib, "XCGUI.lib")
#include "xcgui.h"
int CALLBACK CallUiThread(int data)
{
HWINDOW hWindow = (HWINDOW)data;
HELE hButton =
XBtn_Create(100, 100, 80, 30, L
"button", hWindow);
return 10;
}
DWORD WINAPI MyThreadFunction(LPVOID lpParam)
{
XTRACE("start \n");
Sleep(1000 * 5);
XTRACE("exit \n");
return 0;
}
int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
{
HWINDOW hWindow =
XWnd_Create(0, 0, 300, 200, L
"炫彩界面库-窗口");
if (hWindow)
{
DWORD threadID = 0;
HANDLE hHandle = CreateThread(NULL, 0, MyThreadFunction, hWindow, 0, &threadID);
CloseHandle(hHandle);
}
return 0;
}
void WINAPI XEle_Redraw(HELE hEle, BOOL bImmediate)
元素_重绘 重绘元素.
Definition: EleUI.cpp:4179
vint WINAPI XC_CallUiThread(funCallUiThread pCall, vint data)
@炫彩_调用界面线程 调用UI线程, 设置回调函数,在回调函数里操作UI,通过SendMessage()实现,阻塞模式
Definition: Api.cpp:69
void WINAPI XExitXCGUI()
炫彩_退出 退出界面库释放资源. 不可在dllmain()中卸载, 否则会死锁
Definition: App.cpp:572
void WINAPI XRunXCGUI()
炫彩_运行 运行消息循环,当炫彩窗口数量为0时退出.
Definition: App.cpp:564
BOOL WINAPI XInitXCGUI(BOOL bD2D)
炫彩_初始化 初始化界面库.
Definition: App.cpp:557
HWINDOW WINAPI XWnd_Create(int x, int y, int cx, int cy, const wchar_t *pTitle, HWND hWndParent, int XCStyle)
窗口_创建 创建窗口
Definition: WindowUI.cpp:5964
BOOL WINAPI XWnd_ShowWindow(HWINDOW hWindow, int nCmdShow)
@窗口_显示扩展 显示隐藏及控制窗口最大化还原等
Definition: WindowUI.cpp:6387