#include "windows.h"宏定义 | |
| #define | MZ_DECLARE_DYNAMIC(theClass) |
| Window class name declaration macro for the MZFC based & derived window classes | |
| #define | MZ_HI12(l) ((WORD)((DWORD_PTR)(l) >> 20)) |
| #define | MZ_HI20(l) ((DWORD)((DWORD_PTR)(l) >> 12)) |
| #define | MZ_IMPLEMENT_DYNAMIC(theClass) |
| Window class name definition macro for the MZFC based & derived window classes | |
| #define | MZ_LO12(l) ((WORD)((DWORD_PTR)(l) & 0xfff)) |
| #define | MZ_LO20(l) ((DWORD)((DWORD_PTR)(l) & 0xfffff)) |
| #define | MZ_MAKELPARAM_12_20(a, b) ((LONG)(((WORD)((DWORD_PTR)(a) & 0xfff)) | ((DWORD)((DWORD)((DWORD_PTR)(b) & 0xfffff))) << 12)) |
| #define | MZ_MAKELPARAM_20_12(a, b) ((LONG)(((DWORD)((DWORD_PTR)(a) & 0xfffff)) | ((DWORD)((WORD)((DWORD_PTR)(b) & 0xfff))) << 20)) |
| #define | MZ_MESSAGE_TIME_OUT 200 |
| #define | MZ_MN_LBUTTONDBLCLK 0x0003 |
| Notify type of MZ_WM_MOUSE_NOTIFY: left mouse button double click | |
| #define | MZ_MN_LBUTTONDOWN 0x0001 |
| Notify type of MZ_WM_MOUSE_NOTIFY: left mouse button down | |
| #define | MZ_MN_LBUTTONUP 0x0002 |
| Notify type of MZ_WM_MOUSE_NOTIFY: left mouse button up | |
| #define | MZ_MN_MOUSEMOVE 0x0004 |
| Notify type of MZ_WM_MOUSE_NOTIFY: mouse move | |
| #define | MZ_MN_PRESSEDHOLD_START 0x0005 |
| Notify type of MZ_WM_MOUSE_NOTIFY: left mouse button hold start | |
| #define | MZ_MN_PRESSEDHOLD_TIMEUP 0x0006 |
| Notify type of MZ_WM_MOUSE_NOTIFY: left mouse button hold time up | |
| #define | MZ_PHONE_TOPBAR_HEIGHT 32 |
| #define | MZ_SMS_NEW_REQUEST 0x0870 |
| #define | MZ_TIMER_ID 0x10000000 |
| MZFC internal Timer definitions | |
| #define | MZ_TIMER_ID_MUTILINEEDIT_DOWN (MZ_TIMER_ID+0x00050000) |
| #define | MZ_TIMER_ID_MUTILINEEDIT_UP (MZ_TIMER_ID+0x00040000) |
| #define | MZ_TIMER_ID_SINGLELINEEDIT (MZ_TIMER_ID+0x00030000) |
| #define | MZ_TIMER_ID_WIN_HOLD (MZ_TIMER_ID+0x00020000) |
| #define | MZ_TIMER_ID_WIN_SCROLL (MZ_TIMER_ID+0x00010000) |
| #define | MZ_WM_BUTTON_STATE_CHANGED 0x0811 |
| 按钮状态改变后、重画前,会发出这个消息 | |
| #define | MZ_WM_COMMAND MZFC_WM_MESSAGE+0x0001 |
| command message of MZFC | |
| #define | MZ_WM_DB_CHANGE_MSG 0x1002 |
| #define | MZ_WM_LIST_ITEM_DRAG_H MZFC_WM_MESSAGE+0x0030 |
| UiList sent when the list control is horizontally dragged. | |
| #define | MZ_WM_LIST_ITEM_DRAG_H_Y MZFC_WM_MESSAGE+0x0031 |
| UiList sent when the list control is horizontally dragged. | |
| #define | MZ_WM_LIST_MUSICCLICK 0x0808 |
| #define | MZ_WM_LIST_PICCLICK 0x0807 |
| #define | MZ_WM_LIST_UPDATE_MMS_HEIGHT 0x0810 |
| #define | MZ_WM_LIST_VIDEOCLICK 0x0809 |
| #define | MZ_WM_MMS_CANCEL 0x0853 |
| #define | MZ_WM_MMS_DOWNLOAD 0x0855 |
| #define | MZ_WM_MMS_LINKCLICK 0x0854 |
| #define | MZ_WM_MMS_PROGRESS 0x0852 |
| #define | MZ_WM_MOUSE_NOTIFY MZFC_WM_MESSAGE+0x0002 |
| Mouse notify message of MZFC UiWin controls. | |
| #define | MZ_WM_MOUSE_NOTIFY_X MZFC_WM_MESSAGE+0x0005 |
| Mouse notify message of MZFC UiWin controls. | |
| #define | MZ_WM_MOUSE_NOTIFY_Y MZFC_WM_MESSAGE+0x0004 |
| Mouse notify message of MZFC UiWin controls. | |
| #define | MZ_WM_NOTIFY_MSG_ONOFF 0x1000 |
| #define | MZ_WM_SCROLL_PASSBY_ITEM MZFC_WM_MESSAGE+0x0044 |
| #define | MZ_WM_TASKMAN_ONOFF 0x1001 |
| #define | MZ_WM_UI_FOCUS MZFC_WM_MESSAGE+0x0020 |
| when controls get focus or lost focus, will send this message to its container window | |
| #define | MZ_WM_UI_POSTMESSAGE MZFC_WM_MESSAGE+0x0021 |
| used to post message to an UiWin | |
| #define | MZ_WM_UI_SCROLL_START MZFC_WM_MESSAGE+0x0042 |
| sent when a control is going to start scroll | |
| #define | MZ_WM_UI_SCROLL_STOP MZFC_WM_MESSAGE+0x0043 |
| sent when a control is going to stop scroll | |
| #define | MZ_WM_UIMULTILINEEDIT_TEXT_CHANGE 0x0828 |
| #define | MZ_WM_UIMUTILINEEDIT_ADDIMAGE 0x0826 |
| #define | MZ_WM_UIMUTILINEEDIT_ADDLINE 0x0822 |
| #define | MZ_WM_UIMUTILINEEDIT_BUTTONUP 0x0824 |
| #define | MZ_WM_UIMUTILINEEDIT_CHANGESCROLL 0x0827 |
| #define | MZ_WM_UIMUTILINEEDIT_NEEDLINE 0x0823 |
| #define | MZ_WM_UIMUTILINEEDIT_PASTE 0x0825 |
| #define | MZ_WM_UIMUTILINEEDIT_PICCLICK 0x0821 |
| #define | MZ_WM_UISINGLELINEEDIT MZFC_WM_MESSAGE+0x0045 |
| single line edit will send this message | |
| #define | MZ_WM_WND_ACTIVATE MZFC_WM_MESSAGE+0x0003 |
| when CMzWnd receives WM_ACTIVATE message, it will send this message to its child windows,the message params are same as WM_ACTIVATE | |
| #define | MZFC_WM_MESSAGE 0xFFF10000 |
| #define | RECT_CENTER_H(rc) (((rc).right+(rc).left)/2) |
| Horizontal center of rect | |
| #define | RECT_CENTER_V(rc) (((rc).bottom+(rc).top)/2) |
| Vertical center of rect | |
| #define | RECT_HEIGHT(rc) ((rc).bottom-(rc).top) |
| height of rect | |
| #define | RECT_WIDTH(rc) ((rc).right-(rc).left) |
| width of rect | |
| #define | TASKMAN_EXEC_PROG 3 |
| #define | TASKMAN_QUIT_WND 2 |
| #define | TASKMAN_SHOW_WND 1 |
| #define MZ_DECLARE_DYNAMIC | ( | theClass | ) |
值:
public:\ static WCHAR* m_pwsz##theClass##ClassName; \ virtual WCHAR* GetMzClassName();
Code example:
class CMyMainWnd :public CMzWnd { MZ_DECLARE_DYNAMIC(CMyMainWnd); // ... };
| #define MZ_HI12 | ( | l | ) | ((WORD)((DWORD_PTR)(l) >> 20)) |
| #define MZ_HI20 | ( | l | ) | ((DWORD)((DWORD_PTR)(l) >> 12)) |
| #define MZ_IMPLEMENT_DYNAMIC | ( | theClass | ) |
值:
WCHAR* ##theClass::m_pwsz##theClass##ClassName = L#theClass; \
WCHAR* ##theClass::GetMzClassName() \
{\
return m_pwsz##theClass##ClassName; \
}
Code example:
// int the implement source file: MZ_IMPLEMENT_DYNAMIC(CMyMainWnd);
| #define MZ_LO12 | ( | l | ) | ((WORD)((DWORD_PTR)(l) & 0xfff)) |
| #define MZ_LO20 | ( | l | ) | ((DWORD)((DWORD_PTR)(l) & 0xfffff)) |
| #define MZ_MAKELPARAM_12_20 | ( | a, | |||
| b | ) | ((LONG)(((WORD)((DWORD_PTR)(a) & 0xfff)) | ((DWORD)((DWORD)((DWORD_PTR)(b) & 0xfffff))) << 12)) |
| #define MZ_MAKELPARAM_20_12 | ( | a, | |||
| b | ) | ((LONG)(((DWORD)((DWORD_PTR)(a) & 0xfffff)) | ((DWORD)((WORD)((DWORD_PTR)(b) & 0xfff))) << 20)) |
| #define MZ_MESSAGE_TIME_OUT 200 |
| #define MZ_MN_LBUTTONDBLCLK 0x0003 |
Notify type of MZ_WM_MOUSE_NOTIFY: left mouse button double click
| #define MZ_MN_LBUTTONDOWN 0x0001 |
Notify type of MZ_WM_MOUSE_NOTIFY: left mouse button down
| #define MZ_MN_LBUTTONUP 0x0002 |
Notify type of MZ_WM_MOUSE_NOTIFY: left mouse button up
| #define MZ_MN_MOUSEMOVE 0x0004 |
Notify type of MZ_WM_MOUSE_NOTIFY: mouse move
| #define MZ_MN_PRESSEDHOLD_START 0x0005 |
Notify type of MZ_WM_MOUSE_NOTIFY: left mouse button hold start
| #define MZ_MN_PRESSEDHOLD_TIMEUP 0x0006 |
Notify type of MZ_WM_MOUSE_NOTIFY: left mouse button hold time up
| #define MZ_PHONE_TOPBAR_HEIGHT 32 |
| #define MZ_SMS_NEW_REQUEST 0x0870 |
| #define MZ_TIMER_ID 0x10000000 |
MZFC internal Timer definitions
| #define MZ_TIMER_ID_MUTILINEEDIT_DOWN (MZ_TIMER_ID+0x00050000) |
| #define MZ_TIMER_ID_MUTILINEEDIT_UP (MZ_TIMER_ID+0x00040000) |
| #define MZ_TIMER_ID_SINGLELINEEDIT (MZ_TIMER_ID+0x00030000) |
| #define MZ_TIMER_ID_WIN_HOLD (MZ_TIMER_ID+0x00020000) |
| #define MZ_TIMER_ID_WIN_SCROLL (MZ_TIMER_ID+0x00010000) |
| #define MZ_WM_BUTTON_STATE_CHANGED 0x0811 |
按钮状态改变后、重画前,会发出这个消息
| #define MZ_WM_COMMAND MZFC_WM_MESSAGE+0x0001 |
command message of MZFC
Buttons, Toolbars, etc. when clicked will send this message to its container window
| #define MZ_WM_DB_CHANGE_MSG 0x1002 |
| #define MZ_WM_LIST_ITEM_DRAG_H MZFC_WM_MESSAGE+0x0030 |
UiList sent when the list control is horizontally dragged.
Called UiList::EnableDragModeH() to enable this functionality When the Y coordinate is bigger than 65535, will receive MZ_WM_LIST_ITEM_DRAG_H_Y instead.
| #define MZ_WM_LIST_ITEM_DRAG_H_Y MZFC_WM_MESSAGE+0x0031 |
UiList sent when the list control is horizontally dragged.
Called UiList::EnableDragModeH() to enable this functionality
| #define MZ_WM_LIST_MUSICCLICK 0x0808 |
| #define MZ_WM_LIST_PICCLICK 0x0807 |
| #define MZ_WM_LIST_UPDATE_MMS_HEIGHT 0x0810 |
| #define MZ_WM_LIST_VIDEOCLICK 0x0809 |
| #define MZ_WM_MMS_CANCEL 0x0853 |
| #define MZ_WM_MMS_DOWNLOAD 0x0855 |
| #define MZ_WM_MMS_LINKCLICK 0x0854 |
| #define MZ_WM_MMS_PROGRESS 0x0852 |
| #define MZ_WM_MOUSE_NOTIFY MZFC_WM_MESSAGE+0x0002 |
Mouse notify message of MZFC UiWin controls.
If UiWin::EnableNotifyMessage() is Enabled, the container window will receive this message whenever the controls is clicked or dragged by the mouse. When the Y coordinate is bigger than 65535, will receive MZ_WM_MOUSE_NOTIFY_Y instead. When the X coordinate is bigger than 65535, will receive MZ_WM_MOUSE_NOTIFY_X instead.
| #define MZ_WM_MOUSE_NOTIFY_X MZFC_WM_MESSAGE+0x0005 |
Mouse notify message of MZFC UiWin controls.
If UiWin::EnableNotifyMessage() is Enabled, the container window will receive this message whenever the controls is clicked or dragged by the mouse.
| #define MZ_WM_MOUSE_NOTIFY_Y MZFC_WM_MESSAGE+0x0004 |
Mouse notify message of MZFC UiWin controls.
If UiWin::EnableNotifyMessage() is Enabled, the container window will receive this message whenever the controls is clicked or dragged by the mouse.
| #define MZ_WM_NOTIFY_MSG_ONOFF 0x1000 |
| #define MZ_WM_SCROLL_PASSBY_ITEM MZFC_WM_MESSAGE+0x0044 |
| #define MZ_WM_TASKMAN_ONOFF 0x1001 |
| #define MZ_WM_UI_FOCUS MZFC_WM_MESSAGE+0x0020 |
when controls get focus or lost focus, will send this message to its container window
| #define MZ_WM_UI_POSTMESSAGE MZFC_WM_MESSAGE+0x0021 |
| #define MZ_WM_UI_SCROLL_START MZFC_WM_MESSAGE+0x0042 |
sent when a control is going to start scroll
UiScrollWin , UiWheel , UiList will send this message
| #define MZ_WM_UI_SCROLL_STOP MZFC_WM_MESSAGE+0x0043 |
sent when a control is going to stop scroll
UiScrollWin , UiWheel , UiList will send this message
| #define MZ_WM_UIMULTILINEEDIT_TEXT_CHANGE 0x0828 |
| #define MZ_WM_UIMUTILINEEDIT_ADDIMAGE 0x0826 |
| #define MZ_WM_UIMUTILINEEDIT_ADDLINE 0x0822 |
| #define MZ_WM_UIMUTILINEEDIT_BUTTONUP 0x0824 |
| #define MZ_WM_UIMUTILINEEDIT_CHANGESCROLL 0x0827 |
| #define MZ_WM_UIMUTILINEEDIT_NEEDLINE 0x0823 |
| #define MZ_WM_UIMUTILINEEDIT_PASTE 0x0825 |
| #define MZ_WM_UIMUTILINEEDIT_PICCLICK 0x0821 |
| #define MZ_WM_UISINGLELINEEDIT MZFC_WM_MESSAGE+0x0045 |
single line edit will send this message
| #define MZ_WM_WND_ACTIVATE MZFC_WM_MESSAGE+0x0003 |
when CMzWnd receives WM_ACTIVATE message, it will send this message to its child windows,the message params are same as WM_ACTIVATE
| #define MZFC_WM_MESSAGE 0xFFF10000 |
reserved messages used by MZFC internal. MZFC internal uses the following message range: 0xFFF10000 to 0xFFF1FFFF
| #define RECT_CENTER_H | ( | rc | ) | (((rc).right+(rc).left)/2) |
Horizontal center of rect
| #define RECT_CENTER_V | ( | rc | ) | (((rc).bottom+(rc).top)/2) |
Vertical center of rect
| #define RECT_HEIGHT | ( | rc | ) | ((rc).bottom-(rc).top) |
height of rect
| #define RECT_WIDTH | ( | rc | ) | ((rc).right-(rc).left) |
width of rect
| #define TASKMAN_EXEC_PROG 3 |
| #define TASKMAN_QUIT_WND 2 |
| #define TASKMAN_SHOW_WND 1 |