框架窗口,支持窗格布局,窗格停靠码头,窗格浮动,窗格拖动,窗格合并等自由组合,并且包含一个主视图.
消息格式请参加文档 事件.
#pragma comment(lib, "XCGUI.lib")
#include "xcgui.h"
class CFrameWindow_Demo
{
public:
HWINDOW m_hWindow;
HELE m_hPane1;
HELE m_hPane2;
HELE m_hPane3;
CFrameWindow_Demo()
{
m_hPane1=NULL;
m_hPane2=NULL;
m_hPane3=NULL;
Init();
}
void Init()
{
}
int OnWndRButtonUp(UINT nFlags,POINT *pPt,BOOL *pbHandled)
{
POINT pt=*pPt;
return 0;
}
int OnWndMenuSelect(int nID,BOOL *pbHandled)
{
XTRACE("menu id %d \n", nID);
switch(nID)
{
case 201:
{
if(NULL==m_hPane1) return 0;
else
}break;
case 202:
{
if(NULL==m_hPane2) return 0;
else
}break;
case 203:
{
if(NULL==m_hPane3) return 0;
else
}break;
}
return 0;
}
};
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
{
CFrameWindow_Demo MyWindow;
return 0;
}
@ pane_align_left
左侧
Definition: XCGUI.h:1592
@ pane_align_right
右侧
Definition: XCGUI.h:1596
@ window_style_default
窗口样式-控制按钮: 居中 图标, 标题, 关闭按钮, 最大化按钮, 最小化按钮
Definition: XCGUI.h:398
BOOL WINAPI XPane_IsShowPane(HELE hEle)
窗格_是否显示 判断窗格是否显示.
Definition: PaneUI.cpp:847
HELE WINAPI XPane_Create(const wchar_t *pName, int nWidth, int nHeight, HWINDOW hFrameWnd)
窗格_创建 创建窗格元素.
Definition: PaneUI.cpp:789
void WINAPI XPane_HidePane(HELE hEle, BOOL bGroupDelay)
窗格_隐藏 隐藏窗格.
Definition: PaneUI.cpp:897
void WINAPI XPane_ShowPane(HELE hEle, BOOL bGroupActivate)
窗格_显示 显示窗格.
Definition: PaneUI.cpp:907
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
XWnd_RegEventCPP(hWindow, nEvent, memberFunction)
窗口_注册事件CPP 注册窗口事件,将类成员函数作为事件响应函数.函数省略参数窗口自身句柄hWindow.
#define XWM_MENU_SELECT
菜单选择
Definition: XCGUI.h:714
HWINDOW WINAPI XFrameWnd_Create(int x, int y, int cx, int cy, const wchar_t *pTitle, HWND hWndParent, int XCStyle)
框架窗口_创建 创建框架窗口
Definition: FrameWndUI.cpp:2502
BOOL WINAPI XFrameWnd_MergePane(HWINDOW hWindow, HELE hPaneDest, HELE hPaneNew)
框架窗口_合并窗格 合并窗格.
Definition: FrameWndUI.cpp:2682
BOOL WINAPI XFrameWnd_AddPane(HWINDOW hWindow, HELE hPaneDest, HELE hPaneNew, pane_align_ align)
框架窗口_添加窗格 添加窗格到框架窗口.
Definition: FrameWndUI.cpp:2670
HWND WINAPI XWnd_GetHWND(HWINDOW hWindow)
窗口_取HWND 获取HWND句柄.
Definition: WindowUI.cpp:6168
void WINAPI XWnd_AdjustLayout(HWINDOW hWindow)
窗口_调整布局 调整窗口布局, 当窗口显示状态才有效.
Definition: WindowUI.cpp:6718
BOOL WINAPI XWnd_ShowWindow(HWINDOW hWindow, int nCmdShow)
@窗口_显示扩展 显示隐藏及控制窗口最大化还原等
Definition: WindowUI.cpp:6387