--- mstools/mfc/include/afxnt.h 2018/08/09 18:21:00 1.1.1.1 +++ mstools/mfc/include/afxnt.h 2018/08/09 18:22:45 1.1.1.2 @@ -2,17 +2,8 @@ #error Please do not include this file independently, #include #endif - -/* WM_CTLCOLOR for 16 bit API compatability */ +// WM_CTLCOLOR for 16 bit API compatability #define WM_CTLCOLOR 0x0019 -#define CTLCOLOR_MSGBOX 0 -#define CTLCOLOR_EDIT 1 -#define CTLCOLOR_LISTBOX 2 -#define CTLCOLOR_BTN 3 -#define CTLCOLOR_DLG 4 -#define CTLCOLOR_SCROLLBAR 5 -#define CTLCOLOR_STATIC 6 - ////////////////////////////////////////////////////////////////////////////// // NOTE: @@ -20,50 +11,16 @@ // the final product. These are a required because of textual inconsistencies // in the Windows NT interface files. Please ignore these. +DECLARE_HANDLE(HTASK); + extern "C" { BOOL WINAPI SubtractRect(RECT FAR*, const RECT FAR*, const RECT FAR*); BOOL WINAPI QueryAbort(HDC, int); } -DECLARE_HANDLE(HTASK); -#define HMODULE HINSTANCE /* HMODULE can be used in place of HINSTANCE */ - -/* EnableScrollBar() flags */ -#ifndef ESB_ENABLE_BOTH -#define ESB_ENABLE_BOTH 0x0000 -#define ESB_DISABLE_BOTH 0x0003 -#define ESB_DISABLE_LEFT 0x0001 -#define ESB_DISABLE_RIGHT 0x0002 -#define ESB_DISABLE_UP 0x0001 -#define ESB_DISABLE_DOWN 0x0002 -#define ESB_DISABLE_LTUP ESB_DISABLE_LEFT -#define ESB_DISABLE_RTDN ESB_DISABLE_RIGHT -#endif - -/* Class field offsets for GetClassLong() and GetClassWord() */ -#ifndef GCW_HBRBACKGROUND -#define GCW_HBRBACKGROUND GCL_HBRBACKGROUND -#define GCW_HCURSOR GCL_HCURSOR -#define GCW_HICON GCL_HICON -#define GCW_HMODULE GCL_HMODULE -#define GCW_CBWNDEXTRA GCL_CBWNDEXTRA -#define GCW_CBCLSEXTRA GCL_CBCLSEXTRA -#define GCW_STYLE GCL_STYLE -#endif - -/* Window field offsets for GetWindowLong() and GetWindowWord() */ -#ifndef GWW_WNDPROC -#define GWW_WNDPROC GWL_WNDPROC -#define GWW_HINSTANCE GWL_HINSTANCE -#define GWW_HWNDPARENT GWL_HWNDPARENT -#define GWW_STYLE GWL_STYLE -#define GWW_EXSTYLE GWL_EXSTYLE -#define GWW_ID GWL_ID -#endif - #undef LoadString -inline int LoadString(HINSTANCE hInstance, UINT uID, +inline int LoadString(HINSTANCE hInstance, UINT uID, LPSTR lpBuffer, int nBufferMax) #ifdef UNICODE { return ::LoadStringW(hInstance, uID, lpBuffer, nBufferMax); } @@ -100,26 +57,25 @@ inline int MessageBox(HWND hWnd, LPCSTR #endif #undef RegQueryValue -inline LONG RegQueryValue(HKEY hKey, LPCSTR lpSubKey, +inline LONG RegQueryValue(HKEY hKey, LPCSTR lpSubKey, LPSTR lpValue, LONG FAR* lpcbValue ) #ifdef UNICODE - { return ::RegQueryValueW(hKey, (LPWSTR)lpSubKey, lpValue, + { return ::RegQueryValueW(hKey, (LPWSTR)lpSubKey, lpValue, (LPDWORD)lpcbValue); } #else - { return ::RegQueryValueA(hKey, (LPSTR)lpSubKey, lpValue, + { return ::RegQueryValueA(hKey, (LPSTR)lpSubKey, lpValue, (LPDWORD)lpcbValue); } #endif // !UNICODE #undef RegSetValue -inline LONG RegSetValue(HKEY hKey, LPCSTR lpSubKey, DWORD dwType, +inline LONG RegSetValue(HKEY hKey, LPCSTR lpSubKey, DWORD dwType, LPCSTR lpData, DWORD cbData ) #ifdef UNICODE - { return ::RegSetValueW(hKey, (LPWSTR)lpSubKey, dwType, + { return ::RegSetValueW(hKey, (LPWSTR)lpSubKey, dwType, (LPSTR)lpData, cbData); } #else - { return ::RegSetValueA(hKey, (LPSTR)lpSubKey, dwType, + { return ::RegSetValueA(hKey, (LPSTR)lpSubKey, dwType, (LPSTR)lpData, cbData); } #endif // !UNICODE -#undef GetCurrentTime -// inline function declared and defined in AFX.H +/////////////////////////////////////////////////////////////////////////////