#pragma comment(lib, "XCGUI.lib")
#include "xcgui.h"
HWINDOW hWindow = NULL;
int CALLBACK OnEventBtnClick_CloseWindow(BOOL* pbHandled)
{
MessageBox(
XWnd_GetHWND(hWindow), L
"你点击了关闭按钮", L
"提示", MB_OK);
return 0;
}
int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
{
if (hWindow)
{
{
}
{
HELE hBtnMin =
XBtn_Create(20, 60, 65, 20, L
"最小化", hLayoutRight);
HELE hBtnMax =
XBtn_Create(20, 60, 90, 20, L
"最大化/还原", hLayoutRight);
HELE hBtnClose =
XBtn_Create(20, 60, 60, 20, L
"关闭", hLayoutRight);
}
}
return 0;
}
@ layout_align_center
居中
Definition: XCGUI.h:1617
@ layout_align_right
右侧
Definition: XCGUI.h:1613
#define XE_BNCLICK
按钮点击事件.
Definition: XCGUI.h:939
@ button_type_close
窗口关闭按钮
Definition: XCGUI.h:299
@ button_type_min
窗口最小化按钮
Definition: XCGUI.h:301
@ button_type_max
窗口最大化还原按钮
Definition: XCGUI.h:303
@ window_style_simple
窗口样式-简单: 居中
Definition: XCGUI.h:404
void WINAPI XEle_SetPadding(HELE hEle, int left, int top, int right, int bottom)
元素_置内填充大小 设置被填充大小.
Definition: EleUI.cpp:4253
HIMAGE WINAPI XImage_LoadFile(const wchar_t *pFileName)
图片_加载从文件 加载图片从文件.
Definition: ImageFrame.cpp:1014
void WINAPI XC_ShowLayoutFrame(BOOL bShow)
炫彩_显示布局边界 显示布局对象边界.
Definition: Api.cpp:585
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
void * HXCGUI
资源句柄
Definition: XCGUI.h:92
void WINAPI XLayoutBox_SetAlignH(HXCGUI hLayoutBox, layout_align_ nAlign)
@布局盒子_置水平对齐
Definition: LayoutEle.cpp:418
void WINAPI XLayoutBox_SetAlignV(HXCGUI hLayoutBox, layout_align_ nAlign)
@布局盒子_置垂直对齐
Definition: LayoutEle.cpp:428
@ layout_size_fill
fill 填充父
Definition: XCGUI.h:1630
@ layout_size_weight
weight 比例,按照比例分配剩余空间
Definition: XCGUI.h:1634
@ layout_size_fixed
固定大小
Definition: XCGUI.h:1628
XEle_RegEventC(hEle, nEvent, memberFunction)
元素_注册事件C 注册元素事件, 回调函数省略元素自身句柄hEle.
HELE WINAPI XLayout_Create(int x, int y, int cx, int cy, HXCGUI hParent)
布局_创建 创建布局元素.
Definition: LayoutEle.cpp:294
void WINAPI XShapePic_SetImage(HXCGUI hShape, HIMAGE hImage)
形状图片_置图片 设置图片.
Definition: Shape.cpp:1613
HXCGUI WINAPI XShapePic_Create(int x, int y, int cx, int cy, HXCGUI hParent)
形状图片_创建 创建形状对象-图片.
Definition: Shape.cpp:1601
HXCGUI WINAPI XShapeText_Create(int x, int y, int cx, int cy, const wchar_t *pName, HXCGUI hParent)
形状文本_创建 创建形状对象文本.
Definition: Shape.cpp:1286
void WINAPI XWnd_EnableLayout(HWINDOW hWindow, BOOL bEnable)
窗口_启用布局 启用布局功能.
Definition: WindowUI.cpp:6266
HWND WINAPI XWnd_GetHWND(HWINDOW hWindow)
窗口_取HWND 获取HWND句柄.
Definition: WindowUI.cpp:6168
HWINDOW WINAPI XWnd_Create(int x, int y, int cx, int cy, const wchar_t *pTitle, HWND hWndParent, int XCStyle)
窗口_创建 创建窗口
Definition: WindowUI.cpp:5964
void WINAPI XWnd_EnableLayoutOverlayBorder(HWINDOW hWindow, BOOL bEnable)
@窗口_启用布局覆盖边框
Definition: WindowUI.cpp:6276
void WINAPI XWnd_AdjustLayout(HWINDOW hWindow)
窗口_调整布局 调整窗口布局, 当窗口显示状态才有效.
Definition: WindowUI.cpp:6718
BOOL WINAPI XWnd_ShowWindow(HWINDOW hWindow, int nCmdShow)
@窗口_显示扩展 显示隐藏及控制窗口最大化还原等
Definition: WindowUI.cpp:6387