atlcrack.h
来自「一个与传统电子字典不同的字典」· C头文件 代码 · 共 2,378 行 · 第 1/5 页
H
2,378 行
SetMsgHandled(TRUE); \
func((LPHELPINFO)lParam); \
lResult = TRUE; \
if(IsMsgHandled()) \
return TRUE; \
}
// void OnHotKey(int nHotKeyID, UINT uModifiers, UINT uVirtKey)
#define MSG_WM_HOTKEY(func) \
if (uMsg == WM_HOTKEY) \
{ \
SetMsgHandled(TRUE); \
func((int)wParam, (UINT)LOWORD(lParam), (UINT)HIWORD(lParam)); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
// void OnInputLangChange(DWORD dwCharSet, HKL hKbdLayout)
#define MSG_WM_INPUTLANGCHANGE(func) \
if (uMsg == WM_INPUTLANGCHANGE) \
{ \
SetMsgHandled(TRUE); \
func((DWORD)wParam, (HKL)lParam); \
lResult = TRUE; \
if(IsMsgHandled()) \
return TRUE; \
}
// void OnInputLangChangeRequest(BOOL bSysCharSet, HKL hKbdLayout)
#define MSG_WM_INPUTLANGCHANGEREQUEST(func) \
if (uMsg == WM_INPUTLANGCHANGEREQUEST) \
{ \
SetMsgHandled(TRUE); \
func((BOOL)wParam, (HKL)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
// void OnNextDlgCtl(BOOL bHandle, WPARAM wCtlFocus)
#define MSG_WM_NEXTDLGCTL(func) \
if (uMsg == WM_NEXTDLGCTL) \
{ \
SetMsgHandled(TRUE); \
func((BOOL)LOWORD(lParam), wParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
// void OnNextMenu(int nVirtKey, LPMDINEXTMENU lpMdiNextMenu)
#define MSG_WM_NEXTMENU(func) \
if (uMsg == WM_NEXTMENU) \
{ \
SetMsgHandled(TRUE); \
func((int)wParam, (LPMDINEXTMENU)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
// int OnNotifyFormat(CWindow wndFrom, int nCommand)
#define MSG_WM_NOTIFYFORMAT(func) \
if (uMsg == WM_NOTIFYFORMAT) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((HWND)wParam, (int)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
// BOOL OnPowerBroadcast(DWORD dwPowerEvent, DWORD dwData)
#define MSG_WM_POWERBROADCAST(func) \
if (uMsg == WM_POWERBROADCAST) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((DWORD)wParam, (DWORD)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
// void OnPrint(CDCHandle dc, UINT uFlags)
#define MSG_WM_PRINT(func) \
if (uMsg == WM_PRINT) \
{ \
SetMsgHandled(TRUE); \
func((HDC)wParam, (UINT)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
// void OnPrintClient(CDCHandle dc, UINT uFlags)
#define MSG_WM_PRINTCLIENT(func) \
if (uMsg == WM_PRINTCLIENT) \
{ \
SetMsgHandled(TRUE); \
func((HDC)wParam, (UINT)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
// void OnRasDialEvent(RASCONNSTATE rasconnstate, DWORD dwError)
#define MSG_WM_RASDIALEVENT(func) \
if (uMsg == WM_RASDIALEVENT) \
{ \
SetMsgHandled(TRUE); \
func((RASCONNSTATE)wParam, (DWORD)lParam); \
lResult = TRUE; \
if(IsMsgHandled()) \
return TRUE; \
}
// void OnSetFont(CFont font, BOOL bRedraw)
#define MSG_WM_SETFONT(func) \
if (uMsg == WM_SETFONT) \
{ \
SetMsgHandled(TRUE); \
func((HFONT)wParam, (BOOL)LOWORD(lParam)); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
// int OnSetHotKey(int nVirtKey, UINT uFlags)
#define MSG_WM_SETHOTKEY(func) \
if (uMsg == WM_SETHOTKEY) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((int)LOBYTE(LOWORD(wParam)), (UINT)HIBYTE(LOWORD(wParam))); \
if(IsMsgHandled()) \
return TRUE; \
}
// HICON OnSetIcon(UINT uType, HICON hIcon)
#define MSG_WM_SETICON(func) \
if (uMsg == WM_SETICON) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((UINT)wParam, (HICON)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
// void OnSetRedraw(BOOL bRedraw)
#define MSG_WM_SETREDRAW(func) \
if (uMsg == WM_SETREDRAW) \
{ \
SetMsgHandled(TRUE); \
func((BOOL)wParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
// int OnSetText(LPCTSTR lpstrText)
#define MSG_WM_SETTEXT(func) \
if (uMsg == WM_SETTEXT) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((LPCTSTR)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
// void OnUserChanged()
#define MSG_WM_USERCHANGED(func) \
if (uMsg == WM_USERCHANGED) \
{ \
SetMsgHandled(TRUE); \
func(); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
///////////////////////////////////////////////////////////////////////////////
// New NT4 & NT5 messages
#if(_WIN32_WINNT >= 0x0400)
// void OnMouseHover(WPARAM wParam, CPoint ptPos)
#define MSG_WM_MOUSEHOVER(func) \
if (uMsg == WM_MOUSEHOVER) \
{ \
SetMsgHandled(TRUE); \
func(wParam, _WTYPES_NS::CPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
// void OnMouseLeave()
#define MSG_WM_MOUSELEAVE(func) \
if (uMsg == WM_MOUSELEAVE) \
{ \
SetMsgHandled(TRUE); \
func(); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#endif /* _WIN32_WINNT >= 0x0400 */
#if(WINVER >= 0x0500)
// void OnMenuRButtonUp(WPARAM wParam, CMenu menu)
#define MSG_WM_MENURBUTTONUP(func) \
if (uMsg == WM_MENURBUTTONUP) \
{ \
SetMsgHandled(TRUE); \
func(wParam, (HMENU)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
// LRESULT OnMenuDrag(WPARAM wParam, CMenu menu)
#define MSG_WM_MENUDRAG(func) \
if (uMsg == WM_MENUDRAG) \
{ \
SetMsgHandled(TRUE); \
lResult = func(wParam, (HMENU)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
// LRESULT OnMenuGetObject(PMENUGETOBJECTINFO info)
#define MSG_WM_MENUGETOBJECT(func) \
if (uMsg == WM_MENUGETOBJECT) \
{ \
SetMsgHandled(TRUE); \
lResult = func((PMENUGETOBJECTINFO)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
// void OnUnInitMenuPopup(UINT nID, CMenu menu)
#define MSG_WM_UNINITMENUPOPUP(func) \
if (uMsg == WM_UNINITMENUPOPUP) \
{ \
SetMsgHandled(TRUE); \
func((UINT)HIWORD(lParam), (HMENU)wParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
// void OnMenuCommand(WPARAM nIndex, CMenu menu)
#define MSG_WM_MENUCOMMAND(func) \
if (uMsg == WM_MENUCOMMAND) \
{ \
SetMsgHandled(TRUE); \
func(wParam, (HMENU)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#endif /* WINVER >= 0x0500 */
#if(_WIN32_WINNT >= 0x0500)
// BOOL OnAppCommand(CWindow wndFocus, short cmd, WORD uDevice, int dwKeys)
#define MSG_WM_APPCOMMAND(func) \
if (uMsg == WM_APPCOMMAND) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((HWND)wParam, GET_APPCOMMAND_LPARAM(lParam), GET_DEVICE_LPARAM(lParam), GET_KEYSTATE_LPARAM(lParam)); \
if(IsMsgHandled()) \
return TRUE; \
}
// void OnNCXButtonDown(int fwButton, short nHittest, CPoint ptPos)
#define MSG_WM_NCXBUTTONDOWN(func) \
if (uMsg == WM_NCXBUTTONDOWN) \
{ \
SetMsgHandled(TRUE); \
func(GET_XBUTTON_WPARAM(wParam), GET_NCHITTEST_WPARAM(wParam), _WTYPES_NS::CPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
// void OnNCXButtonUp(int fwButton, short nHittest, CPoint ptPos)
#define MSG_WM_NCXBUTTONUP(func) \
if (uMsg == WM_NCXBUTTONUP) \
{ \
SetMsgHandled(TRUE); \
func(GET_XBUTTON_WPARAM(wParam), GET_NCHITTEST_WPARAM(wParam), _WTYPES_NS::CPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
// void OnNCXButtonDblClk(int fwButton, short nHittest, CPoint ptPos)
#define MSG_WM_NCXBUTTONDBLCLK(func) \
if (uMsg == WM_NCXBUTTONDBLCLK) \
{ \
SetMsgHandled(TRUE); \
func(GET_XBUTTON_WPARAM(wParam), GET_NCHITTEST_WPARAM(wParam), _WTYPES_NS::CPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
// void OnXButtonDown(int fwButton, int dwKeys, CPoint ptPos)
#define MSG_WM_XBUTTONDOWN(func) \
if (uMsg == WM_XBUTTONDOWN) \
{ \
SetMsgHandled(TRUE); \
func(GET_XBUTTON_WPARAM(wParam), GET_KEYSTATE_WPARAM(wParam), _WTYPES_NS::CPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
// void OnXButtonUp(int fwButton, int dwKeys, CPoint ptPos)
#define MSG_WM_XBUTTONUP(func) \
if (uMsg == WM_XBUTTONUP) \
{ \
SetMsgHandled(TRUE); \
func(GET_XBUTTON_WPARAM(wParam), GET_KEYSTATE_WPARAM(wParam), _WTYPES_NS::CPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
// void OnXButtonDblClk(int fwButton, int dwKeys, CPoint ptPos)
#define MSG_WM_XBUTTONDBLCLK(func) \
if (uMsg == WM_XBUTTONDBLCLK) \
{ \
SetMsgHandled(TRUE); \
func(GET_XBUTTON_WPARAM(wParam), GET_KEYSTATE_WPARAM(wParam), _WTYPES_NS::CPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
// void OnChangeUIState(WORD nAction, WORD nState)
#define MSG_WM_CHANGEUISTATE(func) \
if (uMsg == WM_CHANGEUISTATE) \
{ \
SetMsgHandled(TRUE); \
func(LOWORD(wParam), HIWORD(wParam)); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
// void OnUpdateUIState(WORD nAction, WORD nState)
#define MSG_WM_UPDATEUISTATE(func) \
if (uMsg == WM_UPDATEUISTATE) \
{ \
SetMsgHandled(TRUE); \
func(LOWORD(wParam), HIWORD(wParam)); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
// LRESULT OnQueryUIState()
#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)
// void OnInput(WPARAM RawInputCode, HRAWINPUT hRawInput)
#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; \
}
// void OnUniChar(TCHAR nChar, UINT nRepCnt, UINT nFlags)
#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; \
} \
}
// void OnWTSSessionChange(WPARAM nStatusCode, PWTSSESSION_NOTIFICATION nSessionID)
#define MSG_WM_WTSSESSION_CHANGE(func) \
if (uMsg == WM_WTSSESSION_CHANGE) \
{ \
SetMsgHandled(TRUE); \
func(wParam, (PWTSSESSION_NOTIFICATION)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
// OnThemeChanged()
#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
// BOOL OnForwardMsg(LPMSG Msg, DWORD nUserData)
#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
// LRESULT OnDMGetDefID()
#define MSG_DM_GETDEFID(func) \
if (uMsg == DM_GETDEFID) \
{ \
SetMsgHandled(TRUE); \
lResult = func(); \
if(IsMsgHandled()) \
return TRUE; \
}
// void OnDMSetDefID(UINT DefID)
#define MSG_DM_SETDEFID(func) \
if (uMsg == DM_SETDEFID) \
{ \
SetMsgHandled(TRUE); \
func((UINT)wParam); \
lResult = TRUE; \
if(IsMsgHandled()) \
return TRUE; \
}
// void OnDMReposition()
#define MSG_DM_REPOSITION(func) \
if (uMsg == DM_REPOSITION) \
{ \
SetMsgHandled(TRUE); \
func(); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
///////////////////////////////////////////////////////////////////////////////
// Reflected messages
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?