1 /*****************************************************************************\
2 *                                                                                                                                *
3 * windowsx.h -  Macro APIs, window message crackers, and control APIs               *
4 *                                                                                                                                *
5 *                         Version Win32 / Windows NT                                                            *
6 *                                                                                                                                *
7 *                         Copyright (c) 1992-1999, Microsoft Corp.  All rights reserved.*
8 *                                                                                                                                *
9 \*****************************************************************************/
10
11 #ifndef _INC_WINDOWSX
12 #define _INC_WINDOWSX
13
14 #if (_MSC_VER >= 1020)
15 #pragma once
16 #endif
17
18 #ifdef __cplusplus
19 extern "C" {                    /* Assume C declarations for C++ */
20 #endif /* __cplusplus */
21
22 #ifndef SNDMSG
23 #ifdef __cplusplus
24 #ifndef _MAC
25 #define SNDMSG ::SendMessage
26 #else
27 #define SNDMSG ::AfxSendMessage
28 #endif
29 #else     /* __cplusplus */
30 #ifndef _MAC
31 #define SNDMSG SendMessage
32 #else
33 #define SNDMSG AfxSendMessage
34 #endif
35 #endif  /* __cplusplus */
36 #endif  /* SNDMSG */
37
38 /****** KERNEL Macro APIs ****************************************************/
39
40 #define        GetInstanceModule(hInstance) (HMODULE)(hInstance)
41
42 #define        GlobalPtrHandle(lp)               \
43                           ((HGLOBAL)GlobalHandle(lp))
44
45 #define        GlobalLockPtr(lp)                          \
46                           ((BOOL)GlobalLock(GlobalPtrHandle(lp)))
47 #define        GlobalUnlockPtr(lp)          \
48                           GlobalUnlock(GlobalPtrHandle(lp))
49
50 #ifndef _MAC
Lines 51 ... 1314 are skipped.
1315 #define GET_WM_VSCROLL_HWND(wp, lp)                            (HWND)(lp)
1316 #define GET_WM_VSCROLL_MPS(code, pos, hwnd)      \
1317              (WPARAM)MAKELONG(code, pos), (LPARAM)(hwnd)
1318
1319 /****** C runtime porting macros ****************************************/
1320
1321 #define _ncalloc      calloc
1322 #define _nexpand      _expand
1323 #define _ffree          free
1324 #define _fmalloc      malloc
1325 #define _fmemccpy     _memccpy
1326 #define _fmemchr      memchr
1327 #define _fmemcmp      memcmp
1328 #define _fmemcpy      memcpy
1329 #define _fmemicmp     _memicmp
1330 #define _fmemmove     memmove
1331 #define _fmemset      memset
1332 #define _fmsize        _msize
1333 #define _frealloc     realloc
1334 #define _fstrcat      strcat
1335 #define _fstrchr      strchr
1336 #define _fstrcmp      strcmp
1337 #define _fstrcpy      strcpy
1338 #define _fstrcspn     strcspn
1339 #define _fstrdup      _strdup
1340 #define _fstricmp     _stricmp
1341 #define _fstrlen      strlen
1342 #define _fstrlwr      _strlwr
1343 #define _fstrncat     strncat
1344 #define _fstrncmp     strncmp
1345 #define _fstrncpy     strncpy
1346 #define _fstrnicmp  _strnicmp
1347 #define _fstrnset     _strnset
1348 #define _fstrpbrk     strpbrk
1349 #define _fstrrchr     strrchr
1350 #define _fstrrev      _strrev
1351 #define _fstrset      _strset
1352 #define _fstrspn      strspn
1353 #define _fstrstr      strstr
1354 #define _fstrtok      strtok
1355 #define _fstrupr      _strupr
1356 #define _nfree          free
1357 #define _nmalloc      malloc
1358 #define _nmsize        _msize
1359 #define _nrealloc     realloc
1360 #define _nstrdup      _strdup
1361 #define hmemcpy        MoveMemory
1362
1363 #ifndef DECLARE_HANDLE32
1364 #define DECLARE_HANDLE32      DECLARE_HANDLE
1365 #endif
1366
1367 #ifdef __cplusplus
1368 }                                      /* End of extern "C" { */
1369 #endif           /* __cplusplus */
1370
1371 #endif  /* !_INC_WINDOWSX */
1372
1373