?? atlcrack.h
字號:
// Windows Template Library - WTL version 7.0
// Copyright (C) 1997-2002 Microsoft Corporation
// All rights reserved.
//
// This file is a part of the Windows Template Library.
// The code and information is provided "as-is" without
// warranty of any kind, either expressed or implied.
#ifndef __ATLCRACK_H__
#define __ATLCRACK_H__
#pragma once
// For ATL 3.0, message map using cracked handlers MUST use BEGIN_MSG_MAP_EX
#if (_ATL_VER >= 0x0700)
#define BEGIN_MSG_MAP_EX(theClass) BEGIN_MSG_MAP(theClass)
#else //!(_ATL_VER >= 0x0700)
#define BEGIN_MSG_MAP_EX(theClass) \
public: \
BOOL m_bATL3MsgHandled; \
/* "handled" management for cracked handlers */ \
BOOL IsMsgHandled() const \
{ \
return m_bATL3MsgHandled; \
} \
void SetMsgHandled(BOOL bHandled) \
{ \
m_bATL3MsgHandled = bHandled; \
} \
BOOL ProcessWindowMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& lResult, DWORD dwMsgMapID = 0) \
{ \
BOOL bATL3OldMsgHandled = m_bATL3MsgHandled; \
BOOL bRet = _ProcessWindowMessage(hWnd, uMsg, wParam, lParam, lResult, dwMsgMapID); \
m_bATL3MsgHandled = bATL3OldMsgHandled; \
return bRet; \
} \
BOOL _ProcessWindowMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT& lResult, DWORD dwMsgMapID) \
{ \
BOOL bHandled = TRUE; \
hWnd; \
uMsg; \
wParam; \
lParam; \
lResult; \
bHandled; \
switch(dwMsgMapID) \
{ \
case 0:
#endif //!(_ATL_VER >= 0x0700)
///////////////////////////////////////////////////////////////////////////////
// Standard Windows message macros
#define MSG_WM_CREATE(func) \
if (uMsg == WM_CREATE) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((LPCREATESTRUCT)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_INITDIALOG(func) \
if (uMsg == WM_INITDIALOG) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((HWND)wParam, lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_COPYDATA(func) \
if (uMsg == WM_COPYDATA) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((HWND)wParam, (PCOPYDATASTRUCT)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_DESTROY(func) \
if (uMsg == WM_DESTROY) \
{ \
SetMsgHandled(TRUE); \
func(); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_MOVE(func) \
if (uMsg == WM_MOVE) \
{ \
SetMsgHandled(TRUE); \
func(CPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_SIZE(func) \
if (uMsg == WM_SIZE) \
{ \
SetMsgHandled(TRUE); \
func((UINT)wParam, CSize(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_ACTIVATE(func) \
if (uMsg == WM_ACTIVATE) \
{ \
SetMsgHandled(TRUE); \
func((UINT)LOWORD(wParam), (BOOL)HIWORD(wParam), (HWND)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_SETFOCUS(func) \
if (uMsg == WM_SETFOCUS) \
{ \
SetMsgHandled(TRUE); \
func((HWND)wParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_KILLFOCUS(func) \
if (uMsg == WM_KILLFOCUS) \
{ \
SetMsgHandled(TRUE); \
func((HWND)wParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_ENABLE(func) \
if (uMsg == WM_ENABLE) \
{ \
SetMsgHandled(TRUE); \
func((BOOL)wParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_PAINT(func) \
if (uMsg == WM_PAINT) \
{ \
SetMsgHandled(TRUE); \
func((HDC)wParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_CLOSE(func) \
if (uMsg == WM_CLOSE) \
{ \
SetMsgHandled(TRUE); \
func(); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_QUERYENDSESSION(func) \
if (uMsg == WM_QUERYENDSESSION) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((UINT)wParam, (UINT)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_QUERYOPEN(func) \
if (uMsg == WM_QUERYOPEN) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func(); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_ERASEBKGND(func) \
if (uMsg == WM_ERASEBKGND) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((HDC)wParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_SYSCOLORCHANGE(func) \
if (uMsg == WM_SYSCOLORCHANGE) \
{ \
SetMsgHandled(TRUE); \
func(); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_ENDSESSION(func) \
if (uMsg == WM_ENDSESSION) \
{ \
SetMsgHandled(TRUE); \
func((BOOL)wParam, (UINT)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_SHOWWINDOW(func) \
if (uMsg == WM_SHOWWINDOW) \
{ \
SetMsgHandled(TRUE); \
func((BOOL)wParam, (int)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_CTLCOLOREDIT(func) \
if (uMsg == WM_CTLCOLOREDIT) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((HDC)wParam, (HWND)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_CTLCOLORLISTBOX(func) \
if (uMsg == WM_CTLCOLORLISTBOX) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((HDC)wParam, (HWND)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_CTLCOLORBTN(func) \
if (uMsg == WM_CTLCOLORBTN) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((HDC)wParam, (HWND)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_CTLCOLORDLG(func) \
if (uMsg == WM_CTLCOLORDLG) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((HDC)wParam, (HWND)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_CTLCOLORSCROLLBAR(func) \
if (uMsg == WM_CTLCOLORSCROLLBAR) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((HDC)wParam, (HWND)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_CTLCOLORSTATIC(func) \
if (uMsg == WM_CTLCOLORSTATIC) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((HDC)wParam, (HWND)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_SETTINGCHANGE(func) \
if (uMsg == WM_SETTINGCHANGE) \
{ \
SetMsgHandled(TRUE); \
func((UINT)wParam, (LPCTSTR)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_DEVMODECHANGE(func) \
if (uMsg == WM_DEVMODECHANGE) \
{ \
SetMsgHandled(TRUE); \
func((LPCTSTR)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_ACTIVATEAPP(func) \
if (uMsg == WM_ACTIVATEAPP) \
{ \
SetMsgHandled(TRUE); \
func((BOOL)wParam, (DWORD)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_FONTCHANGE(func) \
if (uMsg == WM_FONTCHANGE) \
{ \
SetMsgHandled(TRUE); \
func(); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_TIMECHANGE(func) \
if (uMsg == WM_TIMECHANGE) \
{ \
SetMsgHandled(TRUE); \
func(); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_CANCELMODE(func) \
if (uMsg == WM_CANCELMODE) \
{ \
SetMsgHandled(TRUE); \
func(); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_SETCURSOR(func) \
if (uMsg == WM_SETCURSOR) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((HWND)wParam, (UINT)LOWORD(lParam), (UINT)HIWORD(lParam)); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_MOUSEACTIVATE(func) \
if (uMsg == WM_MOUSEACTIVATE) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((HWND)wParam, (UINT)LOWORD(lParam), (UINT)HIWORD(lParam)); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_CHILDACTIVATE(func) \
if (uMsg == WM_CHILDACTIVATE) \
{ \
SetMsgHandled(TRUE); \
func(); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_GETMINMAXINFO(func) \
if (uMsg == WM_GETMINMAXINFO) \
{ \
SetMsgHandled(TRUE); \
func((LPMINMAXINFO)lParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_ICONERASEBKGND(func) \
if (uMsg == WM_ICONERASEBKGND) \
{ \
SetMsgHandled(TRUE); \
func((HDC)wParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_SPOOLERSTATUS(func) \
if (uMsg == WM_SPOOLERSTATUS) \
{ \
SetMsgHandled(TRUE); \
func((UINT)wParam, (UINT)LOWORD(lParam)); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_DRAWITEM(func) \
if (uMsg == WM_DRAWITEM) \
{ \
SetMsgHandled(TRUE); \
func((UINT)wParam, (LPDRAWITEMSTRUCT)lParam); \
lResult = TRUE; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_MEASUREITEM(func) \
if (uMsg == WM_MEASUREITEM) \
{ \
SetMsgHandled(TRUE); \
func((UINT)wParam, (LPMEASUREITEMSTRUCT)lParam); \
lResult = TRUE; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_DELETEITEM(func) \
if (uMsg == WM_DELETEITEM) \
{ \
SetMsgHandled(TRUE); \
func((UINT)wParam, (LPDELETEITEMSTRUCT)lParam); \
lResult = TRUE; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_CHARTOITEM(func) \
if (uMsg == WM_CHARTOITEM) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((UINT)LOWORD(wParam), (UINT)HIWORD(wParam), (HWND)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_VKEYTOITEM(func) \
if (uMsg == WM_VKEYTOITEM) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((UINT)LOWORD(wParam), (UINT)HIWORD(wParam), (HWND)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_QUERYDRAGICON(func) \
if (uMsg == WM_QUERYDRAGICON) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func(); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_COMPAREITEM(func) \
if (uMsg == WM_COMPAREITEM) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((UINT)wParam, (LPCOMPAREITEMSTRUCT)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_COMPACTING(func) \
if (uMsg == WM_COMPACTING) \
{ \
SetMsgHandled(TRUE); \
func((UINT)wParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_NCCREATE(func) \
if (uMsg == WM_NCCREATE) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((LPCREATESTRUCT)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_NCDESTROY(func) \
if (uMsg == WM_NCDESTROY) \
{ \
SetMsgHandled(TRUE); \
func(); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_NCCALCSIZE(func) \
if (uMsg == WM_NCCALCSIZE) \
{ \
SetMsgHandled(TRUE); \
lResult = func((BOOL)wParam, lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_NCHITTEST(func) \
if (uMsg == WM_NCHITTEST) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func(CPoint(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_NCPAINT(func) \
if (uMsg == WM_NCPAINT) \
{ \
SetMsgHandled(TRUE); \
func((HRGN)wParam); \
lResult = 0; \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_NCACTIVATE(func) \
if (uMsg == WM_NCACTIVATE) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((BOOL)wParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_GETDLGCODE(func) \
if (uMsg == WM_GETDLGCODE) \
{ \
SetMsgHandled(TRUE); \
lResult = (LRESULT)func((LPMSG)lParam); \
if(IsMsgHandled()) \
return TRUE; \
}
#define MSG_WM_NCMOUSEMOVE(func) \
if (uMsg == WM_NCMOUSEMOVE) \
{ \
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -