--- np2/win9x/win32sub.h 2006/12/24 00:52:30 1.2 +++ np2/win9x/win32sub.h 2007/10/26 14:38:34 1.6 @@ -5,22 +5,45 @@ #define SUBCLASSPROC FARPROC #endif -#if defined(_WIN64) -#define GetWindowInst(h) (HINSTANCE)GetWindowLongPtr((h), GWLP_HINSTANCE) -#define GetWindowProc(h) (SUBCLASSPROC)GetWindowLongPtr((h), GWLP_WNDPROC) -#define SetWindowProc(h, f) SetWindowLongPtr((h), GWLP_WNDPROC, (LONG)(f)) -#else -#define GetWindowInst(h) (HINSTANCE)GetWindowLong((h), GWL_HINSTANCE) -#define GetWindowProc(h) (SUBCLASSPROC)GetWindowLong((h), GWL_WNDPROC) -#define SetWindowProc(h, f) SetWindowLong((h), GWL_WNDPROC, (LONG)(f)) +// for VC6SDK +#if !defined(_WIN64) +#ifndef LONG_PTR +#define LONG_PTR LONG +#endif +#ifndef GetWindowLongPtr +#define GetWindowLongPtr GetWindowLong +#endif +#ifndef SetWindowLongPtr +#define SetWindowLongPtr SetWindowLong +#endif +#ifndef GWLP_WNDPROC +#define GWLP_WNDPROC GWL_WNDPROC +#endif +#ifndef GWLP_HINSTANCE +#define GWLP_HINSTANCE GWL_HINSTANCE +#endif +#ifndef GWLP_HWNDPARENT +#define GWLP_HWNDPARENT GWL_HWNDPARENT +#endif +#ifndef GWLP_USERDATA +#define GWLP_USERDATA GWL_USERDATA +#endif +#ifndef GWLP_ID +#define GWLP_ID GWL_ID +#endif #endif +#define LOADSTRING LoadString #ifdef __cplusplus extern "C" { #endif void __msgbox(const char *title, const char *msg); +int loadstringresource(HINSTANCE hInstance, UINT uID, + LPTSTR lpBuffer, int nBufferMax); +TCHAR *lockstringresource(HINSTANCE hInstance, LPCTSTR pszString); +void unlockstringresource(TCHAR *pszString); #ifdef __cplusplus }