📄 win32types.h
字号:
/****************************************************************************
* *
* windef.h -- Basic Windows Type Definitions *
* *
* Copyright (c) 1985-1997, Microsoft Corp. All rights reserved. *
* *
****************************************************************************/
/****************************************************************************
*modify by Darkay Li for linux compatible *
****************************************************************************/
#ifndef INCLUDED_WIN32TYPES_H
#define INCLUDED_WIN32TYPES_H
#if defined(HAS_PRAGMA_ONCE)
#pragma PRAGMA_ONCE_DECLARE
#endif
// Win32 defines _WIN32 automatically,
// but Macintosh doesn't, so if we are using
// Win32 Functions, we must do it here
#ifdef __cplusplus
extern "C" {
#endif
/*
* BASETYPES is defined in ntdef.h if these types are already defined
*/
#ifndef BASETYPES
#define BASETYPES
typedef unsigned long ULONG;
typedef ULONG *PULONG;
typedef unsigned short USHORT;
typedef USHORT *PUSHORT;
typedef unsigned char UCHAR;
typedef UCHAR *PUCHAR;
typedef char *PSZ;
#endif /* !BASETYPES */
#define MAX_PATH 260
#define _MAX_PATH MAX_PATH
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#if defined( WIN32 )
typedef unsigned long DWORD;
typedef int BOOL;
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef float FLOAT;
typedef FLOAT *PFLOAT;
typedef BOOL near *PBOOL;
typedef BOOL far *LPBOOL;
typedef BYTE near *PBYTE;
typedef BYTE far *LPBYTE;
typedef int near *PINT;
typedef int far *LPINT;
typedef WORD near *PWORD;
typedef WORD far *LPWORD;
typedef long far *LPLONG;
typedef DWORD near *PDWORD;
typedef DWORD far *LPDWORD;
typedef void far *LPVOID;
typedef const void far *LPCVOID;
#else
# define DWORD unsigned long
# define BOOL int
# define BYTE unsigned char
# define WORD unsigned short
# define LPVOID void*
# define LONG long
# define SHORT short
#endif
typedef int INT;
typedef unsigned int UINT;
typedef unsigned int *PUINT;
#ifndef NOMINMAX
#ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef min
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
#endif /* NOMINMAX */
#define MAKEWORD(a, b) ((WORD)(((BYTE)(a)) | ((WORD)((BYTE)(b))) << 8))
#define MAKELONG(a, b) ((LONG)(((WORD)(a)) | ((DWORD)((WORD)(b))) << 16))
#define LOWORD(l) ((WORD)(l))
#define HIWORD(l) ((WORD)(((DWORD)(l) >> 16) & 0xFFFF))
#define LOBYTE(w) ((BYTE)(w))
#define HIBYTE(w) ((BYTE)(((WORD)(w) >> 8) & 0xFF))
typedef DWORD COLORREF;
typedef DWORD *LPCOLORREF;
typedef struct tagRECT
{
LONG left;
LONG top;
LONG right;
LONG bottom;
} RECT, *PRECT;
typedef struct tagPOINT
{
LONG x;
LONG y;
} POINT, *PPOINT;
typedef struct tagSIZE
{
LONG cx;
LONG cy;
} SIZE, *PSIZE;
typedef struct tagPOINTS
{
SHORT y;
SHORT x;
} POINTS, *PPOINTS;
#ifdef __cplusplus
}
#endif
#endif /* _WINDEF_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -