📄 atlcrack.h
字号:
#define MSG_WM_QUERYUISTATE(func) \
if (uMsg == WM_QUERYUISTATE) \
{ \
SetMsgHandled(TRUE); \
lResult = func(); \
if(IsMsgHandled()) \
return TRUE; \
}
#endif // (_WIN32_WINNT >= 0x0500)
#if(_WIN32_WINNT >= 0x0501)
#define MSG_WM_INPUT(func) \
if (uMsg == WM_INPUT) \
{ \
SetMsgHandled(TRUE); \
func(GET_RAWINPUT_CODE_WPARAM(wParam), (HRAWINPUT)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_UNICHAR(func) \
if (uMsg == WM_UNICHAR) \
{ \
SetMsgHandled(TRUE); \
func((TCHAR)wParam, (UINT)lParam & 0xFFFF, (UINT)((lParam & 0xFFFF0000) >> 16)); \
if(IsMsgHandled()) \
{ \
lResult = (wParam == UNICODE_NOCHAR) ? TRUE : FALSE; \
return TRUE; \
} \
}
#define MSG_WM_WTSSESSION_CHANGE(func) \
if (uMsg == WM_WTSSESSION_CHANGE) \
{ \
SetMsgHandled(TRUE); \
func(wParam, (PWTSSESSION_NOTIFICATION)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_THEMECHANGED(func) \
if (uMsg == WM_THEMECHANGED) \
{ \
SetMsgHandled(TRUE); \
func(); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#endif /* _WIN32_WINNT >= 0x0501 */
///////////////////////////////////////////////////////////////////////////////
// ATL defined messages
#define MSG_WM_FORWARDMSG(func) \
if (uMsg == WM_FORWARDMSG) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((LPMSG)lParam, (DWORD)wParam); \
if(IsMsgHandled()) \
return TRUE; \
}
///////////////////////////////////////////////////////////////////////////////
// Dialog specific messages
#define MSG_DM_GETDEFID(func) \
if (uMsg == DM_GETDEFID) \
{ \
SetMsgHandled(TRUE); \
lResult = func(); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_DM_SETDEFID(func) \
if (uMsg == DM_SETDEFID) \
{ \
SetMsgHandled(TRUE); \
func((UINT)wParam); \
lResult = TRUE; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_DM_REPOSITION(func) \
if (uMsg == DM_REPOSITION) \
{ \
SetMsgHandled(TRUE); \
func(); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
///////////////////////////////////////////////////////////////////////////////
// Reflected messages
#define MSG_OCM_COMMAND(func) \
if (uMsg == OCM_COMMAND) \
{ \
SetMsgHandled(TRUE); \
func((UINT)HIWORD(wParam), (int)LOWORD(wParam), (HWND)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_OCM_NOTIFY(func) \
if (uMsg == OCM_NOTIFY) \
{ \
SetMsgHandled(TRUE); \
lResult = func((int)wParam, (LPNMHDR)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_OCM_PARENTNOTIFY(func) \
if (uMsg == OCM_PARENTNOTIFY) \
{ \
SetMsgHandled(TRUE); \
func((UINT)LOWORD(wParam), (UINT)HIWORD(wParam), lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_OCM_DRAWITEM(func) \
if (uMsg == OCM_DRAWITEM) \
{ \
SetMsgHandled(TRUE); \
func((UINT)wParam, (LPDRAWITEMSTRUCT)lParam); \
lResult = TRUE; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_OCM_MEASUREITEM(func) \
if (uMsg == OCM_MEASUREITEM) \
{ \
SetMsgHandled(TRUE); \
func((UINT)wParam, (LPMEASUREITEMSTRUCT)lParam); \
lResult = TRUE; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_OCM_COMPAREITEM(func) \
if (uMsg == OCM_COMPAREITEM) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((UINT)wParam, (LPCOMPAREITEMSTRUCT)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_OCM_DELETEITEM(func) \
if (uMsg == OCM_DELETEITEM) \
{ \
SetMsgHandled(TRUE); \
func((UINT)wParam, (LPDELETEITEMSTRUCT)lParam); \
lResult = TRUE; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_OCM_VKEYTOITEM(func) \
if (uMsg == OCM_VKEYTOITEM) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((UINT)LOWORD(wParam), (UINT)HIWORD(wParam), (HWND)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_OCM_CHARTOITEM(func) \
if (uMsg == OCM_CHARTOITEM) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((UINT)LOWORD(wParam), (UINT)HIWORD(wParam), (HWND)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_OCM_HSCROLL(func) \
if (uMsg == OCM_HSCROLL) \
{ \
SetMsgHandled(TRUE); \
func((int)LOWORD(wParam), (short)HIWORD(wParam), (HWND)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_OCM_VSCROLL(func) \
if (uMsg == OCM_VSCROLL) \
{ \
SetMsgHandled(TRUE); \
func((int)LOWORD(wParam), (short)HIWORD(wParam), (HWND)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_OCM_CTLCOLOREDIT(func) \
if (uMsg == OCM_CTLCOLOREDIT) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((HDC)wParam, (HWND)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_OCM_CTLCOLORLISTBOX(func) \
if (uMsg == OCM_CTLCOLORLISTBOX) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((HDC)wParam, (HWND)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_OCM_CTLCOLORBTN(func) \
if (uMsg == OCM_CTLCOLORBTN) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((HDC)wParam, (HWND)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_OCM_CTLCOLORDLG(func) \
if (uMsg == OCM_CTLCOLORDLG) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((HDC)wParam, (HWND)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_OCM_CTLCOLORSCROLLBAR(func) \
if (uMsg == OCM_CTLCOLORSCROLLBAR) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((HDC)wParam, (HWND)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_OCM_CTLCOLORSTATIC(func) \
if (uMsg == OCM_CTLCOLORSTATIC) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((HDC)wParam, (HWND)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
///////////////////////////////////////////////////////////////////////////////
// Edit specific messages
#define MSG_WM_CLEAR(func) \
if (uMsg == WM_CLEAR) \
{ \
SetMsgHandled(TRUE); \
func(); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_COPY(func) \
if (uMsg == WM_COPY) \
{ \
SetMsgHandled(TRUE); \
func(); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_CUT(func) \
if (uMsg == WM_CUT) \
{ \
SetMsgHandled(TRUE); \
func(); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_PASTE(func) \
if (uMsg == WM_PASTE) \
{ \
SetMsgHandled(TRUE); \
func(); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_UNDO(func) \
if (uMsg == WM_UNDO) \
{ \
SetMsgHandled(TRUE); \
func(); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
///////////////////////////////////////////////////////////////////////////////
// Generic message handlers
#define MESSAGE_HANDLER_EX(msg, func) \
if(uMsg == msg) \
{ \
SetMsgHandled(TRUE); \
lResult = func(uMsg, wParam, lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MESSAGE_RANGE_HANDLER_EX(msgFirst, msgLast, func) \
if(uMsg >= msgFirst && uMsg <= msgLast) \
{ \
SetMsgHandled(TRUE); \
lResult = func(uMsg, wParam, lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
///////////////////////////////////////////////////////////////////////////////
// Commands and notifications
#define COMMAND_HANDLER_EX(id, code, func) \
if (uMsg == WM_COMMAND && code == HIWORD(wParam) && id == LOWORD(wParam)) \
{ \
SetMsgHandled(TRUE); \
func((UINT)HIWORD(wParam), (int)LOWORD(wParam), (HWND)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define COMMAND_ID_HANDLER_EX(id, func) \
if (uMsg == WM_COMMAND && id == LOWORD(wParam)) \
{ \
SetMsgHandled(TRUE); \
func((UINT)HIWORD(wParam), (int)LOWORD(wParam), (HWND)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define COMMAND_CODE_HANDLER_EX(code, func) \
if (uMsg == WM_COMMAND && code == HIWORD(wParam)) \
{ \
SetMsgHandled(TRUE); \
func((UINT)HIWORD(wParam), (int)LOWORD(wParam), (HWND)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define NOTIFY_HANDLER_EX(id, cd, func) \
if (uMsg == WM_NOTIFY && cd == ((LPNMHDR)lParam)->code && id == ((LPNMHDR)lParam)->idFrom) \
{ \
SetMsgHandled(TRUE); \
lResult = func((LPNMHDR)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define NOTIFY_ID_HANDLER_EX(id, func) \
if (uMsg == WM_NOTIFY && id == ((LPNMHDR)lParam)->idFrom) \
{ \
SetMsgHandled(TRUE); \
lResult = func((LPNMHDR)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define NOTIFY_CODE_HANDLER_EX(cd, func) \
if (uMsg == WM_NOTIFY && cd == ((LPNMHDR)lParam)->code) \
{ \
SetMsgHandled(TRUE); \
lResult = func((LPNMHDR)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define COMMAND_RANGE_HANDLER_EX(idFirst, idLast, func) \
if(uMsg == WM_COMMAND && LOWORD(wParam) >= idFirst && LOWORD(wParam) <= idLast) \
{ \
SetMsgHandled(TRUE); \
func((UINT)HIWORD(wParam), (int)LOWORD(wParam), (HWND)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define COMMAND_RANGE_CODE_HANDLER_EX(idFirst, idLast, code, func) \
if(uMsg == WM_COMMAND && code == HIWORD(wParam) && LOWORD(wParam) >= idFirst && LOWORD(wParam) <= idLast) \
{ \
SetMsgHandled(TRUE); \
func((UINT)HIWORD(wParam), (int)LOWORD(wParam), (HWND)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define NOTIFY_RANGE_HANDLER_EX(idFirst, idLast, func) \
if(uMsg == WM_NOTIFY && ((LPNMHDR)lParam)->idFrom >= idFirst && ((LPNMHDR)lParam)->idFrom <= idLast) \
{ \
SetMsgHandled(TRUE); \
lResult = func((LPNMHDR)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define NOTIFY_RANGE_CODE_HANDLER_EX(idFirst, idLast, cd, func) \
if(uMsg == WM_NOTIFY && cd == ((LPNMHDR)lParam)->code && ((LPNMHDR)lParam)->idFrom >= idFirst && ((LPNMHDR)lParam)->idFrom <= idLast) \
{ \
SetMsgHandled(TRUE); \
lResult = func((LPNMHDR)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define REFLECTED_COMMAND_HANDLER_EX(id, code, func) \
if (uMsg == OCM_COMMAND && code == HIWORD(wParam) && id == LOWORD(wParam)) \
{ \
SetMsgHandled(TRUE); \
func((UINT)HIWORD(wParam), (int)LOWORD(wParam), (HWND)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define REFLECTED_COMMAND_ID_HANDLER_EX(id, func) \
if (uMsg == OCM_COMMAND && id == LOWORD(wParam)) \
{ \
SetMsgHandled(TRUE); \
func((UINT)HIWORD(wParam), (int)LOWORD(wParam), (HWND)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define REFLECTED_COMMAND_CODE_HANDLER_EX(code, func) \
if (uMsg == OCM_COMMAND && code == HIWORD(wParam)) \
{ \
SetMsgHandled(TRUE); \
func((UINT)HIWORD(wParam), (int)LOWORD(wParam), (HWND)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define REFLECTED_NOTIFY_HANDLER_EX(id, cd, func) \
if (uMsg == OCM_NOTIFY && cd == ((LPNMHDR)lParam)->code && id == ((LPNMHDR)lParam)->idFrom) \
{ \
SetMsgHandled(TRUE); \
lResult = func((LPNMHDR)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define REFLECTED_NOTIFY_ID_HANDLER_EX(id, func) \
if (uMsg == OCM_NOTIFY && id == ((LPNMHDR)lParam)->idFrom) \
{ \
SetMsgHandled(TRUE); \
lResult = func((LPNMHDR)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define REFLECTED_NOTIFY_CODE_HANDLER_EX(cd, func) \
if (uMsg == OCM_NOTIFY && cd == ((LPNMHDR)lParam)->code) \
{ \
SetMsgHandled(TRUE); \
lResult = func((LPNMHDR)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define REFLECTED_COMMAND_RANGE_HANDLER_EX(idFirst, idLast, func) \
if(uMsg == OCM_COMMAND && LOWORD(wParam) >= idFirst && LOWORD(wParam) <= idLast) \
{ \
SetMsgHandled(TRUE); \
func((UINT)HIWORD(wParam), (int)LOWORD(wParam), (HWND)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define REFLECTED_COMMAND_RANGE_CODE_HANDLER_EX(idFirst, idLast, code, func) \
if(uMsg == OCM_COMMAND && code == HIWORD(wParam) && LOWORD(wParam) >= idFirst && LOWORD(wParam) <= idLast) \
{ \
SetMsgHandled(TRUE); \
func((UINT)HIWORD(wParam), (int)LOWORD(wParam), (HWND)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define REFLECTED_NOTIFY_RANGE_HANDLER_EX(idFirst, idLast, func) \
if(uMsg == OCM_NOTIFY && ((LPNMHDR)lParam)->idFrom >= idFirst && ((LPNMHDR)lParam)->idFrom <= idLast) \
{ \
SetMsgHandled(TRUE); \
lResult = func((LPNMHDR)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define REFLECTED_NOTIFY_RANGE_CODE_HANDLER_EX(idFirst, idLast, cd, func) \
if(uMsg == OCM_NOTIFY && cd == ((LPNMHDR)lParam)->code && ((LPNMHDR)lParam)->idFrom >= idFirst && ((LPNMHDR)lParam)->idFrom <= idLast) \
{ \
SetMsgHandled(TRUE); \
lResult = func((LPNMHDR)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#endif // __ATLCRACK_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -