Annotation of sql/odbc/MFCpatches/afximpl.h, revision 1.1
1.1 ! paf 1: #if _MSC_VER > 1000
! 2: #pragma once
! 3: #endif
! 4:
! 5: #ifdef SetWindowLongPtrA
! 6: #undef SetWindowLongPtrA
! 7: inline LONG_PTR SetWindowLongPtrA( HWND hWnd, int nIndex, LONG_PTR dwNewLong )
! 8: {
! 9: return( ::SetWindowLongA( hWnd, nIndex, LONG( dwNewLong ) ) );
! 10: }
! 11: #endif
! 12:
! 13: #ifdef SetWindowLongPtrW
! 14: #undef SetWindowLongPtrW
! 15: inline LONG_PTR SetWindowLongPtrW( HWND hWnd, int nIndex, LONG_PTR dwNewLong )
! 16: {
! 17: return( ::SetWindowLongW( hWnd, nIndex, LONG( dwNewLong ) ) );
! 18: }
! 19: #endif
! 20:
! 21: #ifdef GetWindowLongPtrA
! 22: #undef GetWindowLongPtrA
! 23: inline LONG_PTR GetWindowLongPtrA( HWND hWnd, int nIndex )
! 24: {
! 25: return( ::GetWindowLongA( hWnd, nIndex ) );
! 26: }
! 27: #endif
! 28:
! 29: #ifdef GetWindowLongPtrW
! 30: #undef GetWindowLongPtrW
! 31: inline LONG_PTR GetWindowLongPtrW( HWND hWnd, int nIndex )
! 32: {
! 33: return( ::GetWindowLongW( hWnd, nIndex ) );
! 34: }
! 35: #endif
! 36:
! 37: #undef AFX_DATA
! 38: #define AFX_DATA AFX_CORE_DATA
! 39:
! 40: /////////////////////////////////////////////////////////////////////////////
! 41: // Auxiliary System/Screen metrics
! 42:
! 43: struct AUX_DATA
! 44: {
! 45: // system metrics
! 46: int cxVScroll, cyHScroll;
! 47: int cxIcon, cyIcon;
! 48:
! 49: int cxBorder2, cyBorder2;
! 50:
! 51: // device metrics for screen
! 52: int cxPixelsPerInch, cyPixelsPerInch;
! 53:
! 54: // convenient system color
! 55: HBRUSH hbrWindowFrame;
! 56: HBRUSH hbrBtnFace;
! 57:
! 58: // color values of system colors used for CToolBar
! 59: COLORREF clrBtnFace, clrBtnShadow, clrBtnHilite;
! 60: COLORREF clrBtnText, clrWindowFrame;
! 61:
! 62: // standard cursors
! 63: HCURSOR hcurWait;
! 64: HCURSOR hcurArrow;
! 65: HCURSOR hcurHelp; // cursor used in Shift+F1 help
! 66:
! 67: // special GDI objects allocated on demand
! 68: HFONT hStatusFont;
! 69: HFONT hToolTipsFont;
! 70: HBITMAP hbmMenuDot;
! 71:
! 72: // other system information
! 73: BOOL bWin95; // TRUE if Windows 95 (not NT)
! 74:
! 75: // Implementation
! 76: AUX_DATA();
! 77: ~AUX_DATA();
! 78: void UpdateSysColors();
! 79: void UpdateSysMetrics();
! 80: };
! 81:
! 82: extern AFX_DATA AUX_DATA afxData;
! 83:
! 84: /////////////////////////////////////////////////////////////////////////////
! 85: // _AFX_EDIT_STATE
! 86:
! 87: class _AFX_EDIT_STATE : public CNoTrackObject
! 88: {
! 89: public:
! 90: _AFX_EDIT_STATE();
! 91: virtual ~_AFX_EDIT_STATE();
! 92:
! 93: CFindReplaceDialog* pFindReplaceDlg; // find or replace dialog
! 94: BOOL bFindOnly; // Is pFindReplace the find or replace?
! 95: CString strFind; // last find string
! 96: CString strReplace; // last replace string
! 97: BOOL bCase; // TRUE==case sensitive, FALSE==not
! 98: int bNext; // TRUE==search down, FALSE== search up
! 99: BOOL bWord; // TRUE==match whole word, FALSE==not
! 100: };
! 101:
! 102: #undef AFX_DATA
! 103: #define AFX_DATA AFX_CORE_DATA
! 104:
! 105: class _AFX_RICHEDIT_STATE : public _AFX_EDIT_STATE
! 106: {
! 107: public:
! 108: HINSTANCE m_hInstRichEdit; // handle to RICHED32.DLL
! 109: HINSTANCE m_hInstRichEdit2; // handle to RICHED20.DLL
! 110: virtual ~_AFX_RICHEDIT_STATE();
! 111: };
! 112:
! 113: AFX_DATA EXTERN_PROCESS_LOCAL(_AFX_RICHEDIT_STATE, _afxRichEditState)
! 114:
! 115: _AFX_RICHEDIT_STATE* AFX_CDECL AfxGetRichEditState();
! 116:
! 117: /////////////////////////////////////////////////////////////////////////////
! 118: // _AFX_HTMLHELP_STATE
! 119:
! 120: // for dll builds we just delay load it
! 121: #ifndef _AFXDLL
! 122: typedef HWND (WINAPI HTMLHELPPROC)(HWND hwndCaller, LPCTSTR pszFile, UINT uCommand, DWORD_PTR dwData);
! 123:
! 124: class _AFX_HTMLHELP_STATE : public CNoTrackObject
! 125: {
! 126: public:
! 127: virtual ~_AFX_HTMLHELP_STATE();
! 128:
! 129: HINSTANCE m_hInstHtmlHelp;
! 130: HTMLHELPPROC *m_pfnHtmlHelp;
! 131: };
! 132: EXTERN_PROCESS_LOCAL(_AFX_HTMLHELP_STATE, _afxHtmlHelpState)
! 133: #endif
! 134:
! 135: HWND WINAPI AfxHtmlHelp(HWND hWnd, LPCTSTR szHelpFilePath, UINT nCmd, DWORD_PTR dwData);
! 136:
! 137: #undef AFX_DATA
! 138: #define AFX_DATA
! 139:
! 140: ////////////////////////////////////////////////////////////////////////////
! 141: // other global state
! 142:
! 143: class CPushRoutingView
! 144: {
! 145: protected:
! 146: CView* pOldRoutingView;
! 147: _AFX_THREAD_STATE* pThreadState;
! 148: CPushRoutingView* pOldPushRoutingView;
! 149:
! 150: public:
! 151: CPushRoutingView(CView* pNewRoutingView)
! 152: {
! 153: pThreadState = AfxGetThreadState();
! 154: pOldPushRoutingView = pThreadState->m_pPushRoutingView;
! 155: pOldRoutingView = pThreadState->m_pRoutingView;
! 156: pThreadState->m_pRoutingView = pNewRoutingView;
! 157: pThreadState->m_pPushRoutingView = this;
! 158: }
! 159: ~CPushRoutingView()
! 160: {
! 161: if (pThreadState != NULL)
! 162: {
! 163: ASSERT( pThreadState->m_pPushRoutingView == this );
! 164: pThreadState->m_pRoutingView = pOldRoutingView;
! 165: pThreadState->m_pPushRoutingView = pOldPushRoutingView;
! 166: }
! 167: }
! 168: void Pop()
! 169: {
! 170: ASSERT( pThreadState != NULL );
! 171: ASSERT( pThreadState->m_pPushRoutingView == this );
! 172: pThreadState->m_pRoutingView = pOldRoutingView;
! 173: pThreadState->m_pPushRoutingView = pOldPushRoutingView;
! 174: pThreadState = NULL;
! 175: }
! 176: };
! 177:
! 178: // Note: afxData.cxBorder and afxData.cyBorder aren't used anymore
! 179: #define CX_BORDER 1
! 180: #define CY_BORDER 1
! 181:
! 182: // states for Shift+F1 hep mode
! 183: #define HELP_INACTIVE 0 // not in Shift+F1 help mode (must be 0)
! 184: #define HELP_ACTIVE 1 // in Shift+F1 help mode (non-zero)
! 185: #define HELP_ENTERING 2 // entering Shift+F1 help mode (non-zero)
! 186:
! 187: /////////////////////////////////////////////////////////////////////////////
! 188: // Window class names and other window creation support
! 189:
! 190: // from wincore.cpp
! 191: extern const TCHAR _afxWnd[]; // simple child windows/controls
! 192: extern const TCHAR _afxWndControlBar[]; // controls with gray backgrounds
! 193: extern const TCHAR _afxWndMDIFrame[];
! 194: extern const TCHAR _afxWndFrameOrView[];
! 195: extern const TCHAR _afxWndOleControl[];
! 196:
! 197: #define AFX_WND_REG 0x00001
! 198: #define AFX_WNDCONTROLBAR_REG 0x00002
! 199: #define AFX_WNDMDIFRAME_REG 0x00004
! 200: #define AFX_WNDFRAMEORVIEW_REG 0x00008
! 201: #define AFX_WNDCOMMCTLS_REG 0x00010 // means all original Win95
! 202: #define AFX_WNDOLECONTROL_REG 0x00020
! 203: #define AFX_WNDCOMMCTL_UPDOWN_REG 0x00040 // these are original Win95
! 204: #define AFX_WNDCOMMCTL_TREEVIEW_REG 0x00080
! 205: #define AFX_WNDCOMMCTL_TAB_REG 0x00100
! 206: #define AFX_WNDCOMMCTL_PROGRESS_REG 0x00200
! 207: #define AFX_WNDCOMMCTL_LISTVIEW_REG 0x00400
! 208: #define AFX_WNDCOMMCTL_HOTKEY_REG 0x00800
! 209: #define AFX_WNDCOMMCTL_BAR_REG 0x01000
! 210: #define AFX_WNDCOMMCTL_ANIMATE_REG 0x02000
! 211: #define AFX_WNDCOMMCTL_INTERNET_REG 0x04000 // these are new in IE4
! 212: #define AFX_WNDCOMMCTL_COOL_REG 0x08000
! 213: #define AFX_WNDCOMMCTL_USEREX_REG 0x10000
! 214: #define AFX_WNDCOMMCTL_DATE_REG 0x20000
! 215: #define AFX_WNDCOMMCTL_LINK_REG 0x40000 // new in IE6
! 216:
! 217: #define AFX_WIN95CTLS_MASK 0x03FC0 // UPDOWN -> ANIMATE
! 218: #define AFX_WNDCOMMCTLSALL_REG 0x7C010 // COMMCTLS|INTERNET|COOL|USEREX|DATE|LINK
! 219: #define AFX_WNDCOMMCTLSNEW_REG 0x7C000 // INTERNET|COOL|USEREX|DATE
! 220:
! 221: #define AfxDeferRegisterClass(fClass) AfxEndDeferRegisterClass(fClass)
! 222:
! 223: BOOL AFXAPI AfxEndDeferRegisterClass(LONG fToRegister);
! 224:
! 225: // MFC has its own version of the TOOLINFO structure containing the
! 226: // the Win95 base version of the structure. Since MFC targets Win95 base,
! 227: // we need this structure so calls into that old library don't fail.
! 228:
! 229: typedef struct tagAFX_OLDTOOLINFO {
! 230: UINT cbSize;
! 231: UINT uFlags;
! 232: HWND hwnd;
! 233: UINT uId;
! 234: RECT rect;
! 235: HINSTANCE hinst;
! 236: LPTSTR lpszText;
! 237: } AFX_OLDTOOLINFO;
! 238:
! 239: // special AFX window class name mangling
! 240:
! 241: #ifndef _UNICODE
! 242: #define _UNICODE_SUFFIX
! 243: #else
! 244: #define _UNICODE_SUFFIX _T("u")
! 245: #endif
! 246:
! 247: #ifndef _DEBUG
! 248: #define _DEBUG_SUFFIX
! 249: #else
! 250: #define _DEBUG_SUFFIX _T("d")
! 251: #endif
! 252:
! 253: #ifdef _AFXDLL
! 254: #define _STATIC_SUFFIX
! 255: #else
! 256: #define _STATIC_SUFFIX _T("s")
! 257: #endif
! 258:
! 259: #define AFX_WNDCLASS(s) \
! 260: _T("Afx") _T(s) _T("70") _STATIC_SUFFIX _UNICODE_SUFFIX _DEBUG_SUFFIX
! 261:
! 262: #define AFX_WND AFX_WNDCLASS("Wnd")
! 263: #define AFX_WNDCONTROLBAR AFX_WNDCLASS("ControlBar")
! 264: #define AFX_WNDMDIFRAME AFX_WNDCLASS("MDIFrame")
! 265: #define AFX_WNDFRAMEORVIEW AFX_WNDCLASS("FrameOrView")
! 266: #define AFX_WNDOLECONTROL AFX_WNDCLASS("OleControl")
! 267:
! 268: // dialog/commdlg hook procs
! 269: INT_PTR CALLBACK AfxDlgProc(HWND, UINT, WPARAM, LPARAM);
! 270: UINT_PTR CALLBACK _AfxCommDlgProc(HWND hWnd, UINT, WPARAM, LPARAM);
! 271:
! 272: // support for standard dialogs
! 273: extern UINT _afxMsgSETRGB;
! 274: typedef UINT_PTR (CALLBACK* COMMDLGPROC)(HWND, UINT, WPARAM, LPARAM);
! 275:
! 276: // conversion helpers
! 277: //int AFX_CDECL _wcstombsz(char* mbstr, const wchar_t* wcstr, size_t count);
! 278: //int AFX_CDECL _mbstowcsz(wchar_t* wcstr, const char* mbstr, size_t count);
! 279:
! 280: /////////////////////////////////////////////////////////////////////////////
! 281: // Extended dialog templates (new in Win95)
! 282:
! 283: #pragma pack(push, 1)
! 284:
! 285: typedef struct
! 286: {
! 287: WORD dlgVer;
! 288: WORD signature;
! 289: DWORD helpID;
! 290: DWORD exStyle;
! 291: DWORD style;
! 292: WORD cDlgItems;
! 293: short x;
! 294: short y;
! 295: short cx;
! 296: short cy;
! 297: } DLGTEMPLATEEX;
! 298:
! 299: typedef struct
! 300: {
! 301: DWORD helpID;
! 302: DWORD exStyle;
! 303: DWORD style;
! 304: short x;
! 305: short y;
! 306: short cx;
! 307: short cy;
! 308: DWORD id;
! 309: } DLGITEMTEMPLATEEX;
! 310:
! 311: #pragma pack(pop)
! 312:
! 313: /////////////////////////////////////////////////////////////////////////////
! 314: // Special helpers
! 315:
! 316: void AFXAPI AfxCancelModes(HWND hWndRcvr);
! 317: HWND AFXAPI AfxGetParentOwner(HWND hWnd);
! 318: BOOL AFXAPI AfxIsDescendant(HWND hWndParent, HWND hWndChild);
! 319: BOOL AFXAPI AfxHelpEnabled(); // determine if ID_HELP handler exists
! 320: void AFXAPI AfxDeleteObject(HGDIOBJ* pObject);
! 321: BOOL AFXAPI AfxCustomLogFont(UINT nIDS, LOGFONT* pLogFont);
! 322: BOOL AFXAPI AfxGetPropSheetFont(CString& strFace, WORD& wSize, BOOL bWizard);
! 323:
! 324: BOOL AFXAPI _AfxIsComboBoxControl(HWND hWnd, UINT nStyle);
! 325: BOOL AFXAPI _AfxCheckCenterDialog(LPCTSTR lpszResource);
! 326: BOOL AFXAPI _AfxCompareClassName(HWND hWnd, LPCTSTR lpszClassName);
! 327: HWND AFXAPI _AfxChildWindowFromPoint(HWND, POINT);
! 328:
! 329: // for determining version of COMCTL32.DLL
! 330: #define VERSION_WIN4 MAKELONG(0, 4)
! 331: #define VERSION_IE3 MAKELONG(70, 4)
! 332: #define VERSION_IE4 MAKELONG(71, 4)
! 333: #define VERSION_IE401 MAKELONG(72, 4)
! 334: extern int _afxComCtlVersion;
! 335: DWORD AFXAPI _AfxGetComCtlVersion();
! 336:
! 337: #undef AFX_DATA
! 338: #define AFX_DATA AFX_CORE_DATA
! 339:
! 340: // UNICODE/MBCS abstractions
! 341: #ifdef _MBCS
! 342: extern AFX_DATA const BOOL _afxDBCS;
! 343: #else
! 344: #define _afxDBCS FALSE
! 345: #endif
! 346:
! 347: #undef AFX_DATA
! 348: #define AFX_DATA
! 349:
! 350: // determine number of elements in an array (not bytes)
! 351: #define _countof(array) (sizeof(array)/sizeof(array[0]))
! 352:
! 353: #ifndef _AFX_PORTABLE
! 354: int AFX_CDECL AfxCriticalNewHandler(size_t nSize);
! 355: #endif
! 356:
! 357: void AFXAPI AfxGlobalFree(HGLOBAL hGlobal);
! 358:
! 359: /////////////////////////////////////////////////////////////////////////////
! 360: // static exceptions
! 361:
! 362: extern CNotSupportedException _simpleNotSupportedException;
! 363: extern CMemoryException _simpleMemoryException;
! 364: extern CUserException _simpleUserException;
! 365: extern CResourceException _simpleResourceException;
! 366:
! 367: /////////////////////////////////////////////////////////////////////////////
! 368: // useful message ranges
! 369:
! 370: #define WM_SYSKEYFIRST WM_SYSKEYDOWN
! 371: #define WM_SYSKEYLAST WM_SYSDEADCHAR
! 372:
! 373: #define WM_NCMOUSEFIRST WM_NCMOUSEMOVE
! 374: #define WM_NCMOUSELAST WM_NCMBUTTONDBLCLK
! 375:
! 376:
! 377: /////////////////////////////////////////////////////////////////////////////
! 378: // AFX_CRITICAL_SECTION
! 379:
! 380: #undef AFX_DATA
! 381: #define AFX_DATA AFX_CORE_DATA
! 382:
! 383: // these globals are protected by the same critical section
! 384: #define CRIT_DYNLINKLIST 0
! 385: #define CRIT_RUNTIMECLASSLIST 0
! 386: #define CRIT_OBJECTFACTORYLIST 0
! 387: #define CRIT_LOCKSHARED 0
! 388: // these globals are not protected by independent critical sections
! 389: #define CRIT_REGCLASSLIST 1
! 390: #define CRIT_WAITCURSOR 2
! 391: #define CRIT_DROPSOURCE 3
! 392: #define CRIT_DROPTARGET 4
! 393: #define CRIT_RECTTRACKER 5
! 394: #define CRIT_EDITVIEW 6
! 395: #define CRIT_WINMSGCACHE 7
! 396: #define CRIT_HALFTONEBRUSH 8
! 397: #define CRIT_SPLITTERWND 9
! 398: #define CRIT_MINIFRAMEWND 10
! 399: #define CRIT_CTLLOCKLIST 11
! 400: #define CRIT_DYNDLLLOAD 12
! 401: #define CRIT_TYPELIBCACHE 13
! 402: #define CRIT_STOCKMASK 14
! 403: #define CRIT_ODBC 15
! 404: #define CRIT_PROCESSLOCAL 16
! 405: #define CRIT_MAX 17 // Note: above plus one!
! 406:
! 407: #ifdef _MT
! 408: void AFXAPI AfxLockGlobals(int nLockType);
! 409: void AFXAPI AfxUnlockGlobals(int nLockType);
! 410: BOOL AFXAPI AfxCriticalInit();
! 411: void AFXAPI AfxCriticalTerm();
! 412: #else
! 413: #define AfxLockGlobals(nLockType)
! 414: #define AfxUnlockGlobals(nLockType)
! 415: #define AfxCriticalInit() (TRUE)
! 416: #define AfxCriticalTerm()
! 417: #endif
! 418:
! 419: /////////////////////////////////////////////////////////////////////////////
! 420: // Portability abstractions
! 421:
! 422: #define _AfxSetDlgCtrlID(hWnd, nID) SetWindowLong(hWnd, GWL_ID, nID)
! 423: #define _AfxGetDlgCtrlID(hWnd) ((UINT)(WORD)::GetDlgCtrlID(hWnd))
! 424:
! 425: // misc helpers
! 426: BOOL AFXAPI AfxFullPath(LPTSTR lpszPathOut, LPCTSTR lpszFileIn);
! 427: BOOL AFXAPI AfxComparePath(LPCTSTR lpszPath1, LPCTSTR lpszPath2);
! 428:
! 429: UINT AFXAPI AfxGetFileTitle(LPCTSTR lpszPathName, LPTSTR lpszTitle, UINT nMax);
! 430: UINT AFXAPI AfxGetFileName(LPCTSTR lpszPathName, LPTSTR lpszTitle, UINT nMax);
! 431: void AFX_CDECL AfxTimeToFileTime(const CTime& time, LPFILETIME pFileTime);
! 432: void AFXAPI AfxGetRoot(LPCTSTR lpszPath, CString& strRoot);
! 433:
! 434: #ifndef _AFX_NO_OLE_SUPPORT
! 435: class AFX_COM
! 436: {
! 437: public:
! 438: HRESULT CreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter,
! 439: REFIID riid, LPVOID* ppv);
! 440: HRESULT GetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv);
! 441: };
! 442:
! 443: CString AFXAPI AfxStringFromCLSID(REFCLSID rclsid);
! 444: BOOL AFXAPI AfxGetInProcServer(LPCTSTR lpszCLSID, CString& str);
! 445: BOOL AFXAPI AfxResolveShortcut(CWnd* pWnd, LPCTSTR pszShortcutFile,
! 446: LPTSTR pszPath, int cchPath);
! 447: #endif // _AFX_NO_OLE_SUPPORT
! 448:
! 449: #define NULL_TLS ((DWORD)-1)
! 450:
! 451: /////////////////////////////////////////////////////////////////////////////
! 452: // Message map and message dispatch
! 453:
! 454: const AFX_MSGMAP_ENTRY* AFXAPI
! 455: AfxFindMessageEntry(const AFX_MSGMAP_ENTRY* lpEntry,
! 456: UINT nMsg, UINT nCode, UINT nID);
! 457:
! 458: union MessageMapFunctions
! 459: {
! 460: AFX_PMSG pfn; // generic member function pointer
! 461:
! 462: BOOL (AFX_MSG_CALL CCmdTarget::*pfn_b_D)(CDC*);
! 463: BOOL (AFX_MSG_CALL CCmdTarget::*pfn_b_b)(BOOL);
! 464: BOOL (AFX_MSG_CALL CCmdTarget::*pfn_b_u)(UINT);
! 465: BOOL (AFX_MSG_CALL CCmdTarget::*pfn_b_h)(HANDLE);
! 466: BOOL (AFX_MSG_CALL CCmdTarget::*pfn_b_W_u_u)(CWnd*, UINT, UINT);
! 467: BOOL (AFX_MSG_CALL CCmdTarget::*pfn_b_W_COPYDATASTRUCT)(CWnd*, COPYDATASTRUCT*);
! 468: BOOL (AFX_MSG_CALL CCmdTarget::*pfn_b_HELPINFO)(LPHELPINFO);
! 469: HBRUSH (AFX_MSG_CALL CCmdTarget::*pfn_B_D_W_u)(CDC*, CWnd*, UINT);
! 470: HBRUSH (AFX_MSG_CALL CCmdTarget::*pfn_B_D_u)(CDC*, UINT);
! 471: int (AFX_MSG_CALL CCmdTarget::*pfn_i_u_W_u)(UINT, CWnd*, UINT);
! 472: int (AFX_MSG_CALL CCmdTarget::*pfn_i_u_u)(UINT, UINT);
! 473: int (AFX_MSG_CALL CCmdTarget::*pfn_i_W_u_u)(CWnd*, UINT, UINT);
! 474: int (AFX_MSG_CALL CWnd::*pfn_i_s)(LPTSTR);
! 475: LRESULT (AFX_MSG_CALL CWnd::*pfn_l_w_l)(WPARAM, LPARAM);
! 476: LRESULT (AFX_MSG_CALL CWnd::*pfn_l_u_u_M)(UINT, UINT, CMenu*);
! 477: void (AFX_MSG_CALL CWnd::*pfn_v_v)();
! 478: int (AFX_MSG_CALL CWnd::*pfn_i_u)(UINT);
! 479: HCURSOR (AFX_MSG_CALL CWnd::*pfn_C_v)();
! 480: UINT (AFX_MSG_CALL CWnd::*pfn_u_u)(UINT);
! 481: BOOL (AFX_MSG_CALL CWnd::*pfn_b_v)();
! 482: void (AFX_MSG_CALL CWnd::*pfn_v_u)(UINT);
! 483: void (AFX_MSG_CALL CWnd::*pfn_v_u_u)(UINT, UINT);
! 484: void (AFX_MSG_CALL CWnd::*pfn_v_i_i)(int, int);
! 485: void (AFX_MSG_CALL CWnd::*pfn_v_u_u_u)(UINT, UINT, UINT);
! 486: void (AFX_MSG_CALL CWnd::*pfn_v_u_i_i)(UINT, int, int);
! 487: void (AFX_MSG_CALL CWnd::*pfn_v_w_l)(WPARAM, LPARAM);
! 488: void (AFX_MSG_CALL CWnd::*pfn_v_b_W_W)(BOOL, CWnd*, CWnd*);
! 489: void (AFX_MSG_CALL CWnd::*pfn_v_D)(CDC*);
! 490: void (AFX_MSG_CALL CWnd::*pfn_v_M)(CMenu*);
! 491: void (AFX_MSG_CALL CWnd::*pfn_v_M_u_b)(CMenu*, UINT, BOOL);
! 492: void (AFX_MSG_CALL CWnd::*pfn_v_W)(CWnd*);
! 493: void (AFX_MSG_CALL CWnd::*pfn_v_W_u_u)(CWnd*, UINT, UINT);
! 494: void (AFX_MSG_CALL CWnd::*pfn_v_W_p)(CWnd*, CPoint);
! 495: void (AFX_MSG_CALL CWnd::*pfn_v_W_h)(CWnd*, HANDLE);
! 496: void (AFX_MSG_CALL CWnd::*pfn_v_u_W)(UINT, CWnd*);
! 497: void (AFX_MSG_CALL CWnd::*pfn_v_u_W_b)(UINT, CWnd*, BOOL);
! 498: void (AFX_MSG_CALL CWnd::*pfn_v_u_u_W)(UINT, UINT, CWnd*);
! 499: void (AFX_MSG_CALL CWnd::*pfn_v_s)(LPTSTR);
! 500: void (AFX_MSG_CALL CWnd::*pfn_v_u_cs)(UINT, LPCTSTR);
! 501: void (AFX_MSG_CALL CWnd::*pfn_v_i_s)(int, LPTSTR);
! 502: int (AFX_MSG_CALL CWnd::*pfn_i_i_s)(int, LPTSTR);
! 503: UINT (AFX_MSG_CALL CWnd::*pfn_u_p)(CPoint);
! 504: UINT (AFX_MSG_CALL CWnd::*pfn_u_v)();
! 505: void (AFX_MSG_CALL CWnd::*pfn_v_b_NCCALCSIZEPARAMS)(BOOL, NCCALCSIZE_PARAMS*);
! 506: void (AFX_MSG_CALL CWnd::*pfn_v_v_WINDOWPOS)(WINDOWPOS*);
! 507: void (AFX_MSG_CALL CWnd::*pfn_v_u_u_M)(UINT, UINT, HMENU);
! 508: void (AFX_MSG_CALL CWnd::*pfn_v_u_p)(UINT, CPoint);
! 509: void (AFX_MSG_CALL CWnd::*pfn_v_u_pr)(UINT, LPRECT);
! 510: BOOL (AFX_MSG_CALL CWnd::*pfn_b_u_s_p)(UINT, short, CPoint);
! 511: LRESULT (AFX_MSG_CALL CWnd::*pfn_l_v)();
! 512:
! 513: // type safe variant for thread messages
! 514: void (AFX_MSG_CALL CWinThread::*pfn_THREAD)(WPARAM, LPARAM);
! 515:
! 516: // specific type safe variants for WM_COMMAND and WM_NOTIFY messages
! 517: void (AFX_MSG_CALL CCmdTarget::*pfnCmd_v_v)();
! 518: BOOL (AFX_MSG_CALL CCmdTarget::*pfnCmd_b_v)();
! 519: void (AFX_MSG_CALL CCmdTarget::*pfnCmd_v_u)(UINT);
! 520: BOOL (AFX_MSG_CALL CCmdTarget::*pfnCmd_b_u)(UINT);
! 521:
! 522: void (AFX_MSG_CALL CCmdTarget::*pfnNotify_v_NMHDR_pl)(NMHDR*, LRESULT*);
! 523: BOOL (AFX_MSG_CALL CCmdTarget::*pfnNotify_b_NMHDR_pl)(NMHDR*, LRESULT*);
! 524: void (AFX_MSG_CALL CCmdTarget::*pfnNotify_v_u_NMHDR_pl)(UINT, NMHDR*, LRESULT*);
! 525: BOOL (AFX_MSG_CALL CCmdTarget::*pfnNotify_b_u_NMHDR_pl)(UINT, NMHDR*, LRESULT*);
! 526: void (AFX_MSG_CALL CCmdTarget::*pfnCmdUI_v_C)(CCmdUI*);
! 527: void (AFX_MSG_CALL CCmdTarget::*pfnCmdUI_v_C_u)(CCmdUI*, UINT);
! 528:
! 529: void (AFX_MSG_CALL CCmdTarget::*pfnCmd_v_pv)(void*);
! 530: BOOL (AFX_MSG_CALL CCmdTarget::*pfnCmd_b_pv)(void*);
! 531:
! 532: //OLD
! 533: // specific type safe variants for WM-style messages
! 534: // BOOL (AFX_MSG_CALL CWnd::*pfn_bD)(CDC*);
! 535: // BOOL (AFX_MSG_CALL CWnd::*pfn_bb)(BOOL);
! 536: // BOOL (AFX_MSG_CALL CWnd::*pfn_bWww)(CWnd*, UINT, UINT);
! 537: // BOOL (AFX_MSG_CALL CWnd::*pfn_bHELPINFO)(HELPINFO*);
! 538: // BOOL (AFX_MSG_CALL CWnd::*pfn_bWCDS)(CWnd*, COPYDATASTRUCT*);
! 539: // HBRUSH (AFX_MSG_CALL CWnd::*pfn_hDWw)(CDC*, CWnd*, UINT);
! 540: // HBRUSH (AFX_MSG_CALL CWnd::*pfn_hDw)(CDC*, UINT);
! 541: // int (AFX_MSG_CALL CWnd::*pfn_iwWw)(UINT, CWnd*, UINT);
! 542: // int (AFX_MSG_CALL CWnd::*pfn_iww)(UINT, UINT);
! 543: // int (AFX_MSG_CALL CWnd::*pfn_iWww)(CWnd*, UINT, UINT);
! 544: // int (AFX_MSG_CALL CWnd::*pfn_is)(LPTSTR);
! 545: // LRESULT (AFX_MSG_CALL CWnd::*pfn_lwl)(WPARAM, LPARAM);
! 546: // LRESULT (AFX_MSG_CALL CWnd::*pfn_lwwM)(UINT, UINT, CMenu*);
! 547: // void (AFX_MSG_CALL CWnd::*pfn_vv)(void);
! 548:
! 549: // void (AFX_MSG_CALL CWnd::*pfn_vw)(UINT);
! 550: // void (AFX_MSG_CALL CWnd::*pfn_vww)(UINT, UINT);
! 551: // void (AFX_MSG_CALL CWnd::*pfn_vvii)(int, int);
! 552: // void (AFX_MSG_CALL CWnd::*pfn_vwww)(UINT, UINT, UINT);
! 553: // void (AFX_MSG_CALL CWnd::*pfn_vwii)(UINT, int, int);
! 554: // void (AFX_MSG_CALL CWnd::*pfn_vwl)(WPARAM, LPARAM);
! 555: // void (AFX_MSG_CALL CWnd::*pfn_vbWW)(BOOL, CWnd*, CWnd*);
! 556: // void (AFX_MSG_CALL CWnd::*pfn_vD)(CDC*);
! 557: // void (AFX_MSG_CALL CWnd::*pfn_vM)(CMenu*);
! 558: // void (AFX_MSG_CALL CWnd::*pfn_vMwb)(CMenu*, UINT, BOOL);
! 559:
! 560: // void (AFX_MSG_CALL CWnd::*pfn_vW)(CWnd*);
! 561: // void (AFX_MSG_CALL CWnd::*pfn_vWww)(CWnd*, UINT, UINT);
! 562: // void (AFX_MSG_CALL CWnd::*pfn_vWp)(CWnd*, CPoint);
! 563: // void (AFX_MSG_CALL CWnd::*pfn_vWh)(CWnd*, HANDLE);
! 564: // void (AFX_MSG_CALL CWnd::*pfn_vwW)(UINT, CWnd*);
! 565: // void (AFX_MSG_CALL CWnd::*pfn_vwWb)(UINT, CWnd*, BOOL);
! 566: // void (AFX_MSG_CALL CWnd::*pfn_vwwW)(UINT, UINT, CWnd*);
! 567: // void (AFX_MSG_CALL CWnd::*pfn_vwwx)(UINT, UINT);
! 568: // void (AFX_MSG_CALL CWnd::*pfn_vs)(LPTSTR);
! 569: // void (AFX_MSG_CALL CWnd::*pfn_vOWNER)(int, LPTSTR); // force return TRUE
! 570: // int (AFX_MSG_CALL CWnd::*pfn_iis)(int, LPTSTR);
! 571: // UINT (AFX_MSG_CALL CWnd::*pfn_wp)(CPoint);
! 572: // UINT (AFX_MSG_CALL CWnd::*pfn_wv)(void);
! 573: void (AFX_MSG_CALL CWnd::*pfn_vPOS)(WINDOWPOS*);
! 574: void (AFX_MSG_CALL CWnd::*pfn_vCALC)(BOOL, NCCALCSIZE_PARAMS*);
! 575: void (AFX_MSG_CALL CWnd::*pfn_vwp)(UINT, CPoint);
! 576: void (AFX_MSG_CALL CWnd::*pfn_vwwh)(UINT, UINT, HANDLE);
! 577: BOOL (AFX_MSG_CALL CWnd::*pfn_bwsp)(UINT, short, CPoint);
! 578: // void (AFX_MSG_CALL CWnd::*pfn_vws)(UINT, LPCTSTR);
! 579: };
! 580:
! 581: CHandleMap* PASCAL afxMapHWND(BOOL bCreate = FALSE);
! 582: CHandleMap* PASCAL afxMapHIMAGELIST(BOOL bCreate = FALSE);
! 583: CHandleMap* PASCAL afxMapHDC(BOOL bCreate = FALSE);
! 584: CHandleMap* PASCAL afxMapHGDIOBJ(BOOL bCreate = FALSE);
! 585: CHandleMap* PASCAL afxMapHMENU(BOOL bCreate = FALSE);
! 586:
! 587: /////////////////////////////////////////////////////////////////////////////
! 588: // Debugging/Tracing helpers
! 589:
! 590: #ifdef _DEBUG
! 591: void AFXAPI _AfxTraceMsg(LPCTSTR lpszPrefix, const MSG* pMsg);
! 592: BOOL AFXAPI _AfxCheckDialogTemplate(LPCTSTR lpszResource,
! 593: BOOL bInvisibleChild);
! 594: #endif
! 595:
! 596: /////////////////////////////////////////////////////////////////////////////
! 597: // byte-swapping helpers
! 598:
! 599: #ifdef _AFX_BYTESWAP
! 600:
! 601: struct _AFXWORD
! 602: {
! 603: BYTE WordBits[sizeof(WORD)];
! 604: };
! 605: struct _AFXDWORD
! 606: {
! 607: BYTE DwordBits[sizeof(DWORD)];
! 608: };
! 609:
! 610: struct _AFXFLOAT
! 611: {
! 612: BYTE FloatBits[sizeof(float)];
! 613: };
! 614: struct _AFXDOUBLE
! 615: {
! 616: BYTE DoubleBits[sizeof(double)];
! 617: };
! 618: struct _AFXINT64
! 619: {
! 620: BYTE int64Bits[sizeof(__int64)];
! 621: };
! 622:
! 623: inline void _AfxByteSwap(WORD w, BYTE* pb)
! 624: {
! 625: if (pb == NULL)
! 626: {
! 627: AfxThrowInvalidArgException();
! 628: }
! 629: _AFXWORD wAfx;
! 630: *(WORD*)&wAfx = w;
! 631:
! 632: ASSERT(sizeof(WORD) == 2);
! 633:
! 634: *pb++ = wAfx.WordBits[1];
! 635: *pb = wAfx.WordBits[0];
! 636: }
! 637:
! 638: inline void _AfxByteSwap(__int64 dw, BYTE* pb)
! 639: {
! 640: if (pb == NULL)
! 641: {
! 642: AfxThrowInvalidArgException();
! 643: }
! 644: _AFXINT64 wAfx;
! 645: *(__int64*)&wAfx = dw;
! 646:
! 647: ASSERT(sizeof(__int64) == 8);
! 648:
! 649: *pb++ = wAfx.int64Bits[7];
! 650: *pb++ = wAfx.int64Bits[6];
! 651: *pb++ = wAfx.int64Bits[5];
! 652: *pb++ = wAfx.int64Bits[4];
! 653: *pb++ = wAfx.int64Bits[3];
! 654: *pb++ = wAfx.int64Bits[2];
! 655: *pb++ = wAfx.int64Bits[1];
! 656: *pb = wAfx.int64Bits[0];
! 657: }
! 658:
! 659: inline void _AfxByteSwap(DWORD dw, BYTE* pb)
! 660: {
! 661: if (pb == NULL)
! 662: {
! 663: AfxThrowInvalidArgException();
! 664: }
! 665: _AFXDWORD dwAfx;
! 666: *(DWORD*)&dwAfx = dw;
! 667:
! 668: ASSERT(sizeof(DWORD) == 4);
! 669:
! 670: *pb++ = dwAfx.DwordBits[3];
! 671: *pb++ = dwAfx.DwordBits[2];
! 672: *pb++ = dwAfx.DwordBits[1];
! 673: *pb = dwAfx.DwordBits[0];
! 674: }
! 675:
! 676: inline void _AfxByteSwap(float f, BYTE* pb)
! 677: {
! 678: if (pb == NULL)
! 679: {
! 680: AfxThrowInvalidArgException();
! 681: }
! 682: _AFXFLOAT fAfx;
! 683: *(float*)&fAfx = f;
! 684:
! 685: ASSERT(sizeof(float) == 4);
! 686:
! 687: *pb++ = fAfx.FloatBits[3];
! 688: *pb++ = fAfx.FloatBits[2];
! 689: *pb++ = fAfx.FloatBits[1];
! 690: *pb = fAfx.FloatBits[0];
! 691: }
! 692:
! 693: inline void _AfxByteSwap(double d, BYTE* pb)
! 694: {
! 695: if (pb == NULL)
! 696: {
! 697: AfxThrowInvalidArgException();
! 698: }
! 699: _AFXDOUBLE dAfx;
! 700: *(double*)&dAfx = d;
! 701:
! 702: ASSERT(sizeof(double) == 8);
! 703:
! 704: *pb++ = dAfx.DoubleBits[7];
! 705: *pb++ = dAfx.DoubleBits[6];
! 706: *pb++ = dAfx.DoubleBits[5];
! 707: *pb++ = dAfx.DoubleBits[4];
! 708: *pb++ = dAfx.DoubleBits[3];
! 709: *pb++ = dAfx.DoubleBits[2];
! 710: *pb++ = dAfx.DoubleBits[1];
! 711: *pb = dAfx.DoubleBits[0];
! 712: }
! 713: #endif //_AFX_BYTESWAP
! 714:
! 715: #undef AFX_DATA
! 716: #define AFX_DATA
! 717:
! 718: /////////////////////////////////////////////////////////////////////////////
E-mail: