窗口事件-包含系统非客户区事件
Windows 标准消息
WM_PAINT 窗口绘制消息
int CALLBACK OnWndDrawWindow(HDRAW hDraw,BOOL *pbHandled)
- 参数
-
WM_CLOSE 窗口关闭消息.
int CALLBACK OnWndClose(BOOL *pbHandled)
WM_DESTROY 窗口销毁消息.
int CALLBACK OnWndDestroy(BOOL *pbHandled)
WM_NCDESTROY 窗口非客户区销毁消息.
int CALLBACK OnWndNCDestroy(BOOL *pbHandled)
WM_LBUTTONDOWN 窗口鼠标左键按下消息
int CALLBACK OnWndLButtonDown(UINT nFlags,POINT *pPt,BOOL *pbHandled)
- 参数
-
flags | 请参见MSDN WM_LBUTTONDOWN. |
pPt | 鼠标坐标点. |
WM_LBUTTONUP 窗口鼠标左键弹起消息.
int CALLBACK OnWndLButtonUp(UINT nFlags,POINT *pPt,BOOL *pbHandled)
- 参数
-
flags | 请参见MSDN WM_LBUTTONUP. |
pPt | 鼠标坐标点. |
WM_RBUTTONDOWN 窗口鼠标右键按下消息.
int CALLBACK OnWndRButtonDown(UINT nFlags,POINT *pPt,BOOL *pbHandled)
- 参数
-
flags | 请参见MSDN WM_RBUTTONDOWN. |
pPt | 鼠标坐标点. |
WM_RBUTTONUP 窗口鼠标右键弹起消息.
int CALLBACK OnWndRButtonUp(UINT nFlags,POINT *pPt,BOOL *pbHandled)
- 参数
-
flags | 请参见MSDN WM_RBUTTONUP. |
pPt | 鼠标坐标点. |
WM_LBUTTONDBLCLK 窗口鼠标左键双击消息.
int CALLBACK OnWndLButtonDBClick(UINT nFlags,POINT *pPt,BOOL *pbHandled)
- 参数
-
flags | 请参见MSDN WM_LBUTTONDBLCLK. |
pPt | 鼠标坐标点. |
WM_RBUTTONDBLCLK 窗口鼠标右键双击消息.
int CALLBACK OnWndRButtonDBClick(UINT nFlags,POINT *pPt,BOOL *pbHandled)
- 参数
-
flags | 请参见MSDN WM_RBUTTONDBLCLK. |
pPt | 鼠标坐标点. |
WM_MOUSEMOVE 窗口鼠标移动消息.
int CALLBACK OnWndMouseMove(UINT nFlags,POINT *pPt,BOOL *pbHandled)
- 参数
-
flags | 请参见MSDN WM_MOUSEMOVE wParam参数. |
pPt | 鼠标坐标点. |
WM_MOUSEHOVER 窗口鼠标悬停消息.
int CALLBACK OnWndMouseHover(UINT nFlags,POINT *pPt,BOOL *pbHandled)
- 参数
-
flags | 请参见MSDN WM_MOUSEHOVER消息wParam参数. |
pPt | 鼠标位置 |
WM_MOUSELEAVE 窗口鼠标离开消息.
int CALLBACK OnWndMouseLeave(BOOL *pbHandled)
WM_MOUSEWHEEL 窗口鼠标滚轮滚动消息.
int CALLBACK OnWndMouseWheel(UINT nFlags,POINT *pPt,BOOL *pbHandled)
- 参数
-
flags | 请参见MSDN WM_MOUSEWHEEL消息wParam参数. |
pPt | 鼠标坐标点. |
WM_CAPTURECHANGED 窗口鼠标捕获改变消息.
int CALLBACK OnWndCaptureChanged(HWND hWnd,BOOL *pbHandled)
- 参数
-
WM_KEYDOWN 窗口键盘按下消息.
int CALLBACK OnWndKeyDown(WPARAM wParam,LPARAM lParam,BOOL *pbHandled)
- 注解
- wParam,lParam:请参见MSDN WM_KEYDOWN.
WM_KEYUP 窗口键盘弹起消息. int CALLBACK OnWndKeyUp(WPARAM wParam,LPARAM lParam,BOOL *pbHandled)
-
wParam,lParam:请参见MSDN WM_KEYUP.
WM_CHAR 窗口字符输入消息.
int CALLBACK OnWndChar(WPARAM wParam,LPARAM lParam,BOOL *pbHandled)
- 注解
- wParam,lParam:请参见MSDN WM_CHAR.
WM_SIZE 窗口大小改变消息.
int CALLBACK OnWndSize(UINT nFlags,SIZE *pSize,BOOL *pbHandled)
- 参数
-
flags | 请参见MSDN WM_SIZE消息wParam参数. |
pSize | 窗口大小. |
WM_EXITSIZEMOVE 窗口退出移动或调整大小模式循环,详情参见MSDN.
int CALLBACK OnWndExitSizeMove(BOOL *pbHandled)
WM_TIMER 窗口定时器消息.
int CALLBACK OnWndTimer(UINT nIDEvent,BOOL *pbHandled)
- 参数
-
nIDEnent | 定时器标示符. |
uElapse | 指定所经过的系统启动以来的毫秒数,这是由GetTickCount函数的返回值. |
WM_SETFOCUS 窗口获得焦点.
int CALLBACK OnWndSetFocus(BOOL *pbHandled)
WM_KILLFOCUS 窗口失去焦点.
int CALLBACK OnWndKillFocus(BOOL *pbHandled)
WM_SETCURSOR 窗口设置鼠标光标.
int CALLBACK OnWndSetCursor(WPARAM wParam,LPARAM lParam,BOOL *pbHandled)
- 注解
- wParam,lParam:请参见MSDN WM_SETCURSOR.
WM_DROPFILES 拖动文件到窗口消息,需启用:XWnd_EnableDragFiles()
int CALLBACK OnDropFiles(HDROP hDropInfo , BOOL *pbHandled)
- 注解
- 请参见MSDN WM_DROPFILES.
其他Windows系统消息,包含你自定义的Windows消息.
int CALLBACK OnWndOther(WPARAM wParam,LPARAM lParam,BOOL *pbHandled)
- 参数
-
- 注解
- 参数信息请参见MSDN.
◆ XWM_BODYVIEW_RECT
#define XWM_BODYVIEW_RECT 0x7000+24 |
框架窗口主视图坐标改变, 如果主视图没有绑定元素, 那么当坐标改变时触发此事件
int CALLBACK OnWndLayoutViewRect(int width, int height, BOOL *pbHandled);
◆ XWM_DOCK_POPUP
#define XWM_DOCK_POPUP 0x7000+21 |
框架窗口码头弹出窗格 当用户点击码头上的按钮时,显示对应的窗格,当失去焦点时自动隐藏窗格
- 参数
-
hWindowDock | 弹出窗格窗口句柄 |
hPane | 窗格句柄 int CALLBACK OnWndDocPopup(HWINDOW hWindowDock, HELE hPane, BOOL *pbHandled)
|
◆ XWM_FLOAT_PANE
#define XWM_FLOAT_PANE 0x7000+18 |
浮动窗格
int CALLBACK OnWndFloatPane(HWINDOW hFloatWnd, HELE hPane, BOOL *pbHandled)
◆ XWM_FLOATWND_DRAG
#define XWM_FLOATWND_DRAG 0x7000+22 |
浮动窗口拖动 用户拖动浮动窗口移动,显示停靠提示
- 参数
-
hFloatWnd | 拖动的浮动窗口句柄 |
hArray | HWINDOW array[6],窗格停靠提示窗口句柄数组,有6个成员,分别为:[0]中间十字, [1]左侧,[2]顶部,[3]右侧,[4]底部, [5]停靠位置预览 int CALLBACK OnWndFloatWndDrag(HWINDOW hFloatWnd, HWINDOW* hArray, BOOL *pbHandled)
|
◆ XWM_MENU_DRAW_BACKGROUND
#define XWM_MENU_DRAW_BACKGROUND 0x7000+15 |
绘制菜单背景, 启用该功能需要调用XMenu_EnableDrawBackground().
◆ XWM_MENU_DRAWITEM
#define XWM_MENU_DRAWITEM 0x7000+16 |
绘制菜单项事件, 启用该功能需要调用XMenu_EnableDrawItem().
int CALLBACK OnMenuDrawItem(HDRAW hDraw,
menu_drawItem_* pInfo,BOOL *pbHandled)
◆ XWM_MENU_EXIT
#define XWM_MENU_EXIT 0x7000+14 |
菜单退出
int CALLBACK OnWndMenuExit(BOOL *pbHandled)
◆ XWM_MENU_POPUP
#define XWM_MENU_POPUP 0x7000+11 |
菜单弹出
int CALLBACK OnWndMenuPopup(HMENUX hMenu, BOOL *pbHandled)
◆ XWM_MENU_POPUP_WND
#define XWM_MENU_POPUP_WND 0x7000+12 |
菜单弹出窗口
int CALLBACK OnWndMenuPopupWnd(HMENUX hMenu,
menu_popupWnd_ *pInfo,BOOL *pbHandled)
◆ XWM_MENU_SELECT
#define XWM_MENU_SELECT 0x7000+13 |
菜单选择
int CALLBACK OnWndMenuSelect(int nID,BOOL *pbHandled)
◆ XWM_PAINT_DISPLAY
#define XWM_PAINT_DISPLAY 0x7000+20 |
窗口绘制完成并且已经显示到屏幕
int CALLBACK OnWndDrawWindowDisplay(BOOL *pbHandled)
◆ XWM_PAINT_END
#define XWM_PAINT_END 0x7000+19 |
窗口绘制完成消息
int CALLBACK OnWndDrawWindowEnd(HDRAW hDraw,BOOL *pbHandled)
◆ XWM_PANE_SHOW
#define XWM_PANE_SHOW 0x7000+23 |
窗格显示隐藏
int CALLBACK OnWndPaneShow(HELE hPane, BOOL bShow, BOOL *pbHandled);
◆ XWM_SETFOCUS_ELE
#define XWM_SETFOCUS_ELE 0x7000+9 |
指定元素获得焦点
int CALLBACK OnWndSetFocusEle(HELE hEle,BOOL *pbHandled)
◆ XWM_TRAYICON
#define XWM_TRAYICON 0x7000+10 |
托盘图标事件
int CALLBACK OnWndTrayIcon(WPARAM wParam, LPARAM lParam, BOOL *pbHandled)
◆ XWM_WINDPROC
#define XWM_WINDPROC 0x7000+2 |
窗口消息过程
int CALLBACK OnWndProc(UINT message, WPARAM wParam, LPARAM lParam, BOOL *pbHandled)
◆ XWM_XC_TIMER
#define XWM_XC_TIMER 0x7000+5 |
炫彩定时器,非系统定时器,注册消息XWM_TIMER接收
int CALLBACK OnWndXCTimer(UINT nTimerID,BOOL *pbHandled)
- 参数
-