📄 windows.h
字号:
#define DT_METAFILE 5
#define DT_DISPFILE 6
/* CURVECAPS */
#define CC_NONE 0x0000
#define CC_CIRCLES 0x0001
#define CC_PIE 0x0002
#define CC_CHORD 0x0004
#define CC_ELLIPSES 0x0008
#define CC_WIDE 0x0010
#define CC_STYLED 0x0020
#define CC_WIDESTYLED 0x0040
#define CC_INTERIORS 0x0080
#define CC_ROUNDRECT 0x0100
/* LINECAPS */
#define LC_NONE 0x0000
#define LC_POLYLINE 0x0002
#define LC_MARKER 0x0004
#define LC_POLYMARKER 0x0008
#define LC_WIDE 0x0010
#define LC_STYLED 0x0020
#define LC_WIDESTYLED 0x0040
#define LC_INTERIORS 0x0080
/* POLYGONALCAPS */
#define PC_NONE 0x0000
#define PC_POLYGON 0x0001
#define PC_RECTANGLE 0x0002
#define PC_WINDPOLYGON 0x0004
#define PC_SCANLINE 0x0008
#define PC_WIDE 0x0010
#define PC_STYLED 0x0020
#define PC_WIDESTYLED 0x0040
#define PC_INTERIORS 0x0080
/* TEXTCAPS */
#define TC_OP_CHARACTER 0x0001
#define TC_OP_STROKE 0x0002
#define TC_CP_STROKE 0x0004
#define TC_CR_90 0x0008
#define TC_CR_ANY 0x0010
#define TC_SF_X_YINDEP 0x0020
#define TC_SA_DOUBLE 0x0040
#define TC_SA_INTEGER 0x0080
#define TC_SA_CONTIN 0x0100
#define TC_EA_DOUBLE 0x0200
#define TC_IA_ABLE 0x0400
#define TC_UA_ABLE 0x0800
#define TC_SO_ABLE 0x1000
#define TC_RA_ABLE 0x2000
#define TC_VA_ABLE 0x4000
#define TC_RESERVED 0x8000
/* CLIPCAPS */
#define CP_NONE 0x0000
#define CP_RECTANGLE 0x0001
#define CP_REGION 0x0002
/* RASTERCAPS */
#define RC_NONE
#define RC_BITBLT 0x0001
#define RC_BANDING 0x0002
#define RC_SCALING 0x0004
#define RC_BITMAP64 0x0008
#define RC_GDI20_OUTPUT 0x0010
#define RC_GDI20_STATE 0x0020
#define RC_SAVEBITMAP 0x0040
#define RC_DI_BITMAP 0x0080
#define RC_PALETTE 0x0100
#define RC_DIBTODEV 0x0200
#define RC_BIGFONT 0x0400
#define RC_STRETCHBLT 0x0800
#define RC_FLOODFILL 0x1000
#define RC_STRETCHDIB 0x2000
#define RC_OP_DX_OUTPUT 0x4000
#define RC_DEVBITS 0x8000
#endif /* NOGDICAPMASKS */
/****** Coordinate transformation support ***********************************/
int WINAPI SetMapMode(HDC, int);
int WINAPI GetMapMode(HDC);
/* Map modes */
#define MM_TEXT 1
#define MM_LOMETRIC 2
#define MM_HIMETRIC 3
#define MM_LOENGLISH 4
#define MM_HIENGLISH 5
#define MM_TWIPS 6
#define MM_ISOTROPIC 7
#define MM_ANISOTROPIC 8
DWORD WINAPI SetWindowOrg(HDC, int, int);
DWORD WINAPI GetWindowOrg(HDC);
DWORD WINAPI SetWindowExt(HDC, int, int);
DWORD WINAPI GetWindowExt(HDC);
DWORD WINAPI OffsetWindowOrg(HDC, int, int);
DWORD WINAPI ScaleWindowExt(HDC, int, int, int, int);
DWORD WINAPI SetViewportOrg(HDC, int, int);
DWORD WINAPI GetViewportOrg(HDC);
DWORD WINAPI SetViewportExt(HDC, int, int);
DWORD WINAPI GetViewportExt(HDC);
DWORD WINAPI OffsetViewportOrg(HDC, int, int);
DWORD WINAPI ScaleViewportExt(HDC, int, int, int, int);
#if (WINVER >= 0x030a)
BOOL WINAPI SetWindowOrgEx(HDC, int, int, POINT FAR*);
BOOL WINAPI GetWindowOrgEx(HDC, POINT FAR*);
BOOL WINAPI SetWindowExtEx(HDC, int, int, SIZE FAR*);
BOOL WINAPI GetWindowExtEx(HDC, SIZE FAR*);
BOOL WINAPI OffsetWindowOrgEx(HDC, int, int, POINT FAR*);
BOOL WINAPI ScaleWindowExtEx(HDC, int, int, int, int, SIZE FAR*);
BOOL WINAPI SetViewportExtEx(HDC, int, int, SIZE FAR*);
BOOL WINAPI GetViewportExtEx(HDC, SIZE FAR*);
BOOL WINAPI SetViewportOrgEx(HDC, int, int, POINT FAR*);
BOOL WINAPI GetViewportOrgEx(HDC, POINT FAR*);
BOOL WINAPI OffsetViewportOrgEx(HDC, int, int, POINT FAR*);
BOOL WINAPI ScaleViewportExtEx(HDC, int, int, int, int, SIZE FAR*);
#endif /* WINVER >= 0x030a */
BOOL WINAPI DPtoLP(HDC, POINT FAR*, int);
BOOL WINAPI LPtoDP(HDC, POINT FAR*, int);
int WINAPI SetRelAbs(HDC, int); /* ;Internal */
int WINAPI GetRelAbs(HDC); /* ;Internal */
/* Coordinate Modes */
#define ABSOLUTE 1
#define RELATIVE 2
/****** Color support *******************************************************/
typedef DWORD COLORREF;
#define RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)(g)<<8))|(((DWORD)(BYTE)(b))<<16)))
#define GetRValue(rgb) ((BYTE)(rgb))
#define GetGValue(rgb) ((BYTE)(((WORD)(rgb)) >> 8))
#define GetBValue(rgb) ((BYTE)((rgb)>>16))
COLORREF WINAPI GetNearestColor(HDC, COLORREF);
#ifndef NOCOLOR
COLORREF WINAPI GetSysColor(int);
void WINAPI SetSysColors(int, const int FAR*, const COLORREF FAR*);
#define COLOR_SCROLLBAR 0
#define COLOR_BACKGROUND 1
#define COLOR_ACTIVECAPTION 2
#define COLOR_INACTIVECAPTION 3
#define COLOR_MENU 4
#define COLOR_WINDOW 5
#define COLOR_WINDOWFRAME 6
#define COLOR_MENUTEXT 7
#define COLOR_WINDOWTEXT 8
#define COLOR_CAPTIONTEXT 9
#define COLOR_ACTIVEBORDER 10
#define COLOR_INACTIVEBORDER 11
#define COLOR_APPWORKSPACE 12
#define COLOR_HIGHLIGHT 13
#define COLOR_HIGHLIGHTTEXT 14
#define COLOR_BTNFACE 15
#define COLOR_BTNSHADOW 16
#define COLOR_GRAYTEXT 17
#define COLOR_BTNTEXT 18
#if (WINVER >= 0x030a)
#define COLOR_INACTIVECAPTIONTEXT 19
#define COLOR_BTNHIGHLIGHT 20
#define COLOR_MAX 20 /* ;Internal */
#else /* WINVER >= 0x030a */ /* ;Internal */
#define COLOR_MAX 18 /* ;Internal */
#endif /* WINVER >= 0x030a */
#define COLOR_ENDCOLORS COLOR_MAX /* ;Internal */
#endif /* NOCOLOR */
#define WM_SYSCOLORCHANGE 0x0015
/****** GDI Object Support **************************************************/
#ifndef NOGDIOBJ
HGDIOBJ WINAPI GetStockObject(int);
BOOL WINAPI IsGDIObject(HGDIOBJ);
#define GDIOBJ_PEN 1 /* ;Internal */
#define GDIOBJ_BRUSH 2 /* ;Internal */
#define GDIOBJ_FONT 3 /* ;Internal */
#define GDIOBJ_PALETTE 4 /* ;Internal */
#define GDIOBJ_BITMAP 5 /* ;Internal */
#define GDIOBJ_RGN 6 /* ;Internal */
#define GDIOBJ_DC 7 /* ;Internal */
#define GDIOBJ_IC 8 /* ;Internal */
#define GDIOBJ_DISABLEDDC 9 /* ;Internal */
#define GDIOBJ_METADC 10 /* ;Internal */
#define GDIOBJ_METAFILE 11 /* ;Internal */
BOOL WINAPI DeleteObject(HGDIOBJ);
HGDIOBJ WINAPI SelectObject(HDC, HGDIOBJ);
int WINAPI GetObject(HGDIOBJ, int, void FAR*);
BOOL WINAPI UnrealizeObject(HGDIOBJ);
#ifdef STRICT
typedef (CALLBACK* GOBJENUMPROC)(void FAR*, LPARAM);
#else
typedef FARPROC GOBJENUMPROC;
#endif
#ifdef STRICT
int WINAPI EnumObjects(HDC, int, GOBJENUMPROC, LPARAM);
#else
int WINAPI EnumObjects(HDC, int, GOBJENUMPROC, LPSTR);
#endif
/* Object types for EnumObjects() */
#define OBJ_PEN 1
#define OBJ_BRUSH 2
/****** Pen support *********************************************************/
/* Logical Pen */
typedef struct tagLOGPEN
{
UINT lopnStyle;
POINT lopnWidth;
COLORREF lopnColor;
} LOGPEN;
typedef LOGPEN* PLOGPEN;
typedef LOGPEN NEAR* NPLOGPEN;
typedef LOGPEN FAR* LPLOGPEN;
/* Pen Styles */
#define PS_SOLID 0
#define PS_DASH 1
#define PS_DOT 2
#define PS_DASHDOT 3
#define PS_DASHDOTDOT 4
#define PS_NULL 5
#define PS_INSIDEFRAME 6
HPEN WINAPI CreatePen(int, int, COLORREF);
HPEN WINAPI CreatePenIndirect(LOGPEN FAR*);
/* Stock pens for use with GetStockObject(); */
#define WHITE_PEN 6
#define BLACK_PEN 7
#define NULL_PEN 8
/****** Brush support *******************************************************/
/* Brush Styles */
#define BS_SOLID 0
#define BS_NULL 1
#define BS_HOLLOW BS_NULL
#define BS_HATCHED 2
#define BS_PATTERN 3
#define BS_INDEXED 4
#define BS_DIBPATTERN 5
/* Hatch Styles */
#define HS_HORIZONTAL 0
#define HS_VERTICAL 1
#define HS_FDIAGONAL 2
#define HS_BDIAGONAL 3
#define HS_CROSS 4
#define HS_DIAGCROSS 5
/* Logical Brush (or Pattern) */
typedef struct tagLOGBRUSH
{
UINT lbStyle;
COLORREF lbColor;
int lbHatch;
} LOGBRUSH;
typedef LOGBRUSH* PLOGBRUSH;
typedef LOGBRUSH NEAR* NPLOGBRUSH;
typedef LOGBRUSH FAR* LPLOGBRUSH;
typedef LOGBRUSH PATTERN;
typedef PATTERN* PPATTERN;
typedef PATTERN NEAR* NPPATTERN;
typedef PATTERN FAR* LPPATTERN;
HBRUSH WINAPI CreateSolidBrush(COLORREF);
HBRUSH WINAPI CreateHatchBrush(int, COLORREF);
HBRUSH WINAPI CreatePatternBrush(HBITMAP);
HBRUSH WINAPI CreateDIBPatternBrush(HGLOBAL, UINT);
HBRUSH WINAPI CreateBrushIndirect(LOGBRUSH FAR*);
/* Stock brushes for use with GetStockObject() */
#define WHITE_BRUSH 0
#define LTGRAY_BRUSH 1
#define GRAY_BRUSH 2
#define DKGRAY_BRUSH 3
#define BLACK_BRUSH 4
#define NULL_BRUSH 5
#define HOLLOW_BRUSH NULL_BRUSH
DWORD WINAPI SetBrushOrg(HDC, int, int);
DWORD WINAPI GetBrushOrg(HDC);
#if (WINVER >= 0x030a)
BOOL WINAPI GetBrushOrgEx(HDC, POINT FAR*);
#endif /* WINVER >= 0x030a */
#endif /* NOGDIOBJ */
/****** Region support ******************************************************/
HRGN WINAPI CreateRectRgn(int, int, int, int);
HRGN WINAPI CreateRectRgnIndirect(const RECT FAR*);
HRGN WINAPI CreateEllipticRgnIndirect(const RECT FAR*);
HRGN WINAPI CreateEllipticRgn(int, int, int, int);
HRGN WINAPI CreatePolygonRgn(const POINT FAR*, int, int);
HRGN WINAPI CreatePolyPolygonRgn(const POINT FAR*, const int FAR*, int, int);
HRGN WINAPI CreateRoundRectRgn(int, int, int, int, int, int);
/* Region type flags */
#define ERROR 0
#define NULLREGION 1
#define SIMPLEREGION 2
#define COMPLEXREGION 3
void WINAPI SetRectRgn(HRGN, int, int, int, int);
int WINAPI CombineRgn(HRGN, HRGN, HRGN, int);
/* CombineRgn() command values */
#define RGN_AND 1
#define RGN_OR 2
#define RGN_XOR 3
#define RGN_DIFF 4
#define RGN_COPY 5
BOOL WINAPI EqualRgn(HRGN, HRGN);
int WINAPI OffsetRgn(HRGN, int, int);
int WINAPI GetRgnBox(HRGN, RECT FAR*);
BOOL WINAPI RectInRegion(HRGN, const RECT FAR*);
BOOL WINAPI PtInRegion(HRGN, int, int);
/****** Color palette Support ************************************************/
#define PALETTERGB(r,g,b) (0x02000000L | RGB(r,g,b))
#define PALETTEINDEX(i) ((COLORREF)(0x01000000L | (DWORD)(WORD)(i)))
typedef struct tagPALETTEENTRY
{
BYTE peRed;
BYTE peGreen;
BYTE peBlue;
BYTE peFlags;
} PALETTEENTRY;
typedef PALETTEENTRY FAR* LPPALETTEENTRY;
/* Palette entry flags */
#define PC_RESERVED 0x01 /* palette index used for animation */
#define PC_EXPLICIT 0x02 /* palette index is explicit to device */
#define PC_NOCOLLAPSE 0x04 /* do not match color to system palette */
/* Logical Palette */
typedef struct tagLOGPALETTE
{
WORD palVersion;
WORD palNumEntries;
PALETTEENTRY palPalEntry[1];
} LOGPALETTE;
typedef LOGPALETTE* PLOGPALETTE;
typedef LOGPALETTE NEAR* NPLOGPALETTE;
typedef LOGPALETTE FAR* LPLOGPALETTE;
HPALETTE WINAPI CreatePalette(const LOGPALETTE FAR*);
HPALETTE WINAPI SelectPalette(HDC, HPALETTE, BOOL);
UINT WINAPI RealizePalette(HDC);
int WINAPI UpdateColors(HDC);
void WINAPI AnimatePalette(HPALETTE, UINT, UINT, const PALETTEENTRY FAR*);
UINT WINAPI SetPaletteEntries(HPALETTE, UINT, UINT, const PALETTEENTRY FAR*);
UINT WINAPI GetPaletteEntries(HPALETTE, UINT, UINT, PALETTEENTRY FAR*);
UINT WINAPI GetNearestPaletteIndex(HPALETTE, COLORREF);
BOOL WINAPI ResizePalette(HPALETTE, UINT);
UINT WINAPI GetSystemPaletteEntries(HDC, UINT, UINT, PALETTEENTRY FAR*);
UINT WINAPI GetSystemPaletteUse(HDC);
UINT WINAPI SetSystemPaletteUse(HDC, UINT);
/* Get/SetSystemPaletteUse() values */
#define SYSPAL_STATIC 1
#define SYSPAL_NOSTATIC 2
/* Palette window messages */
#define WM_QUERYNEWPALETTE 0x030F
#define WM_PALETTEISCHANGING 0x0310
#define WM_PALETTECHANGED 0x0311
#define WM_PALETTEGONNACHANGE WM_PALETTEISCHANGING /* ;Internal */
#define WM_CHANGEPALETTE WM_PALETTECHANGED /* ;Internal */
/****** Clipping support *****************************************************/
int WINAPI SelectClipRgn(HDC, HRGN);
int WINAPI GetClipBox(HDC, RECT FAR*);
int WINAPI IntersectClipRect(HDC, int, int, int, int);
int WINAPI OffsetClipRgn(HDC, int, int);
int WINAPI ExcludeClipRect(HDC, int, int, int, int);
BOOL WINAPI PtVisible(HDC, int, int);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -