--- mstools/h/windowsx.h 2018/08/09 18:20:29 1.1 +++ mstools/h/windowsx.h 2018/08/09 18:21:07 1.1.1.2 @@ -15,52 +15,6 @@ extern "C" { /* Assume C declarations for C++ */ #endif /* __cplusplus */ -/*********************************************************************/ -/* The following section is temporary. It will be moved to winuser.h */ -/* after the beta release. */ -/* */ -/* */ - -#ifndef WINVER -#define WINVER 0x0314 // version 3.2 -#endif - -#define MAKEWPARAM(l, h) (WPARAM)MAKELONG(l, h) -#define MAKELPARAM(l, h) (LPARAM)MAKELONG(l, h) -#define MAKELRESULT(l, h) (LRESULT)MAKELONG(l, h) -typedef PMINMAXINFO LPMINMAXINFO; - -/* - * Dialog window class - */ -#define WC_DIALOG (MAKEINTATOM(0x8002)) - -/* - * Get/SetWindowWord/Long offsets for use with WC_DIALOG windows - */ -#define DWL_MSGRESULT 0 -#define DWL_DLGPROC 4 -#define DWL_USER 8 - -/* - * DlgDirList, DlgDirListComboBox flags values - */ -#define DDL_READWRITE 0x0000 -#define DDL_READONLY 0x0001 -#define DDL_HIDDEN 0x0002 -#define DDL_SYSTEM 0x0004 -#define DDL_DIRECTORY 0x0010 -#define DDL_ARCHIVE 0x0020 - -#define DDL_POSTMSGS 0x2000 -#define DDL_DRIVES 0x4000 -#define DDL_EXCLUSIVE 0x8000 - -/* */ -/* */ -/*********************************************************************/ - - /****** KERNEL Macro APIs ****************************************************/ #define GetInstanceModule(hInstance) (HMODULE)(hInstance) @@ -111,7 +65,7 @@ typedef PMINMAXINFO LPMINMAXINFO; /****** USER Macro APIs ******************************************************/ -#define GetWindowInstance(hwnd) ((HINSTANCE)GetWindowLong(hwnd, GWL_HINSTANCE)) +#define GetWindowInstance(hwnd) ((HMODULE)GetWindowLong(hwnd, GWL_HINSTANCE)) #define GetWindowStyle(hwnd) ((DWORD)GetWindowLong(hwnd, GWL_STYLE)) #define GetWindowExStyle(hwnd) ((DWORD)GetWindowLong(hwnd, GWL_EXSTYLE)) @@ -503,7 +457,7 @@ typedef PMINMAXINFO LPMINMAXINFO; /* void Cls_OnLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ #define HANDLE_WM_LBUTTONDOWN(hwnd, wParam, lParam, fn) \ - ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam))) + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) #define FORWARD_WM_LBUTTONDOWN(hwnd, fDoubleClick, x, y, keyFlags, fn) \ (void)(fn)((hwnd), (fDoubleClick) ? WM_LBUTTONDBLCLK : WM_LBUTTONDOWN, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) @@ -513,7 +467,7 @@ typedef PMINMAXINFO LPMINMAXINFO; /* void Cls_OnLButtonUp(HWND hwnd, int x, int y, UINT keyFlags); */ #define HANDLE_WM_LBUTTONUP(hwnd, wParam, lParam, fn) \ - ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam))) + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) #define FORWARD_WM_LBUTTONUP(hwnd, x, y, keyFlags, fn) \ (void)(fn)((hwnd), WM_LBUTTONUP, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) @@ -1113,7 +1067,6 @@ typedef PMINMAXINFO LPMINMAXINFO; #define ListBox_SetCaretIndex(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_SETCARETINDEX, (WPARAM)(int)(index), 0L)) #define ListBox_GetCaretIndex(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETCARETINDEX, 0, 0L)) - #define ListBox_FindStringExact(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessage((hwndCtl), LB_FINDSTRINGEXACT, (WPARAM)(int)(indexStart), (LPARAM)(LPCTSTR)(lpszFind))) #define ListBox_SetItemHeight(hwndCtl, index, cy) ((int)(DWORD)SendMessage((hwndCtl), LB_SETITEMHEIGHT, (WPARAM)(int)(index), MAKELPARAM((cy), 0))) @@ -1275,27 +1228,46 @@ typedef PMINMAXINFO LPMINMAXINFO; /****** C runtime porting macros ****************************************/ -#define _fmemcpy(x,y,z) memcpy(x,y,z) -#define _fmemcmp(x,y,z) memcmp(x,y,z) -#define _fmemset(x,y,z) memset(x,y,z) -#define _fmemicmp(x,y,z) memicmp(x,y,z) -#define _fmemmove(x,y,z) memmove(x,y,z) -#define _fstrcpy(x,y) strcpy(x,y) -#define _fstrcmp(x,y) strcmp(x,y) -#define _fstrcat(x,y) strcat(x,y) -#define _fstrlen(x) strlen(x) -#define _fstricmp(x,y) stricmp(x,y) -#define _fstrstr(x,y) strstr(x,y) -#define _fstrncpy(x,y,z) strncpy(x,y,z) -#define _fstrncmp(x,y,z) strncmp(x,y,z) -#define _fstrupr(x) strupr(x) -#define _fstrlwr(x) strlwr(x) -#define _fstrchr(x,y) strchr(x,y) -#define _fstrrchr(x,y) strrchr(x,y) -#define _fstrnicmp(x,y,z) strnicmp(x,y,z) -#define _fstrpbrk(x,y) strpbrk(x,y) -#define _nfree(x) free(x) -#define _nmalloc(x) malloc(x) +#define _ncalloc calloc +#define _nexpand expand +#define _ffree free +#define _fmalloc malloc +#define _fmemccpy memccpy +#define _fmemchr memchr +#define _fmemcmp memcmp +#define _fmemcpy memcpy +#define _fmemicmp memicmp +#define _fmemmove memmove +#define _fmemset memset +#define _fmsize msize +#define _frealloc realloc +#define _fstrcat strcat +#define _fstrchr strchr +#define _fstrcmp strcmp +#define _fstrcpy strcpy +#define _fstrcspn strcspn +#define _fstrdup strdup +#define _fstricmp stricmp +#define _fstrlen strlen +#define _fstrlwr strlwr +#define _fstrncat strncat +#define _fstrncmp strncmp +#define _fstrncpy strncpy +#define _fstrnicmp strnicmp +#define _fstrnset strnset +#define _fstrpbrk strpbrk +#define _fstrrchr strrchr +#define _fstrrev strrev +#define _fstrset strset +#define _fstrspn strspn +#define _fstrstr strstr +#define _fstrtok strtok +#define _fstrupr strupr +#define _nfree free +#define _nmalloc malloc +#define _nmsize msize +#define _nrealloc realloc +#define _nstrdup strdup #ifdef __cplusplus } /* End of extern "C" { */