|
|
1.1 ! root 1: #ifndef WINVER ! 2: #error Please do not include this file independently, #include <afxwin.h> ! 3: #endif ! 4: ! 5: ! 6: /* WM_CTLCOLOR for 16 bit API compatability */ ! 7: #define WM_CTLCOLOR 0x0019 ! 8: #define CTLCOLOR_MSGBOX 0 ! 9: #define CTLCOLOR_EDIT 1 ! 10: #define CTLCOLOR_LISTBOX 2 ! 11: #define CTLCOLOR_BTN 3 ! 12: #define CTLCOLOR_DLG 4 ! 13: #define CTLCOLOR_SCROLLBAR 5 ! 14: #define CTLCOLOR_STATIC 6 ! 15: ! 16: ! 17: ////////////////////////////////////////////////////////////////////////////// ! 18: // NOTE: ! 19: // The remaining declarations and definitions will not be present in ! 20: // the final product. These are a required because of textual inconsistencies ! 21: // in the Windows NT interface files. Please ignore these. ! 22: ! 23: extern "C" ! 24: { ! 25: BOOL WINAPI SubtractRect(RECT FAR*, const RECT FAR*, const RECT FAR*); ! 26: BOOL WINAPI QueryAbort(HDC, int); ! 27: } ! 28: DECLARE_HANDLE(HTASK); ! 29: #define HMODULE HINSTANCE /* HMODULE can be used in place of HINSTANCE */ ! 30: ! 31: /* EnableScrollBar() flags */ ! 32: #ifndef ESB_ENABLE_BOTH ! 33: #define ESB_ENABLE_BOTH 0x0000 ! 34: #define ESB_DISABLE_BOTH 0x0003 ! 35: #define ESB_DISABLE_LEFT 0x0001 ! 36: #define ESB_DISABLE_RIGHT 0x0002 ! 37: #define ESB_DISABLE_UP 0x0001 ! 38: #define ESB_DISABLE_DOWN 0x0002 ! 39: #define ESB_DISABLE_LTUP ESB_DISABLE_LEFT ! 40: #define ESB_DISABLE_RTDN ESB_DISABLE_RIGHT ! 41: #endif ! 42: ! 43: /* Class field offsets for GetClassLong() and GetClassWord() */ ! 44: #ifndef GCW_HBRBACKGROUND ! 45: #define GCW_HBRBACKGROUND GCL_HBRBACKGROUND ! 46: #define GCW_HCURSOR GCL_HCURSOR ! 47: #define GCW_HICON GCL_HICON ! 48: #define GCW_HMODULE GCL_HMODULE ! 49: #define GCW_CBWNDEXTRA GCL_CBWNDEXTRA ! 50: #define GCW_CBCLSEXTRA GCL_CBCLSEXTRA ! 51: #define GCW_STYLE GCL_STYLE ! 52: #endif ! 53: ! 54: /* Window field offsets for GetWindowLong() and GetWindowWord() */ ! 55: #ifndef GWW_WNDPROC ! 56: #define GWW_WNDPROC GWL_WNDPROC ! 57: #define GWW_HINSTANCE GWL_HINSTANCE ! 58: #define GWW_HWNDPARENT GWL_HWNDPARENT ! 59: #define GWW_STYLE GWL_STYLE ! 60: #define GWW_EXSTYLE GWL_EXSTYLE ! 61: #define GWW_ID GWL_ID ! 62: #endif ! 63: ! 64: ! 65: #undef LoadString ! 66: inline int LoadString(HINSTANCE hInstance, UINT uID, ! 67: LPSTR lpBuffer, int nBufferMax) ! 68: #ifdef UNICODE ! 69: { return ::LoadStringW(hInstance, uID, lpBuffer, nBufferMax); } ! 70: #else ! 71: { return ::LoadStringA(hInstance, uID, lpBuffer, nBufferMax); } ! 72: #endif ! 73: ! 74: #undef AnsiToOem ! 75: inline BOOL AnsiToOem(LPCSTR lpcstr, LPSTR lpstr) ! 76: { return ::CharToOemA(lpcstr, lpstr); } ! 77: ! 78: #undef OemToAnsi ! 79: inline BOOL OemToAnsi(LPCSTR lpcstr, LPSTR lpstr) ! 80: { return ::OemToCharA(lpcstr, lpstr); } ! 81: ! 82: #undef GetSysModalWindow ! 83: inline HWND GetSysModalWindow(void) ! 84: { return NULL;} ! 85: ! 86: #undef SetSysModalWindow ! 87: inline HWND SetSysModalWindow(HWND) ! 88: { return NULL; } ! 89: ! 90: #undef GetNextWindow ! 91: inline HWND GetNextWindow(HWND hWnd, UINT uFlag) ! 92: { return ::GetWindow(hWnd, uFlag); } ! 93: ! 94: #undef MessageBox ! 95: inline int MessageBox(HWND hWnd, LPCSTR lpText, LPCSTR lpTitle, UINT fuStyle) ! 96: #ifdef UNICODE ! 97: { return ::MessageBoxExW(hWnd, lpText, lpTitle, fuStyle, 0); } ! 98: #else ! 99: { return ::MessageBoxExA(hWnd, lpText, lpTitle, fuStyle, 0); } ! 100: #endif ! 101: ! 102: #undef RegQueryValue ! 103: inline LONG RegQueryValue(HKEY hKey, LPCSTR lpSubKey, ! 104: LPSTR lpValue, LONG FAR* lpcbValue ) ! 105: #ifdef UNICODE ! 106: { return ::RegQueryValueW(hKey, (LPWSTR)lpSubKey, lpValue, ! 107: (LPDWORD)lpcbValue); } ! 108: #else ! 109: { return ::RegQueryValueA(hKey, (LPSTR)lpSubKey, lpValue, ! 110: (LPDWORD)lpcbValue); } ! 111: #endif // !UNICODE ! 112: ! 113: #undef RegSetValue ! 114: inline LONG RegSetValue(HKEY hKey, LPCSTR lpSubKey, DWORD dwType, ! 115: LPCSTR lpData, DWORD cbData ) ! 116: #ifdef UNICODE ! 117: { return ::RegSetValueW(hKey, (LPWSTR)lpSubKey, dwType, ! 118: (LPSTR)lpData, cbData); } ! 119: #else ! 120: { return ::RegSetValueA(hKey, (LPSTR)lpSubKey, dwType, ! 121: (LPSTR)lpData, cbData); } ! 122: #endif // !UNICODE ! 123: ! 124: #undef GetCurrentTime ! 125: // inline function declared and defined in AFX.H
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.