📄 osdwingdi.h
字号:
/* Device Parameters for GetDeviceCaps() */
#define DRIVERVERSION 0 /* Device driver version */
#define TECHNOLOGY 2 /* Device classification */
#define HORZSIZE 4 /* Horizontal size in millimeters */
#define VERTSIZE 6 /* Vertical size in millimeters */
#define HORZRES 8 /* Horizontal width in pixels */
#define VERTRES 10 /* Vertical height in pixels */
#define BITSPIXEL 12 /* Number of bits per pixel */
#define PLANES 14 /* Number of planes */
#define NUMBRUSHES 16 /* Number of brushes the device has */
#define NUMPENS 18 /* Number of pens the device has */
#define NUMMARKERS 20 /* Number of markers the device has */
#define NUMFONTS 22 /* Number of fonts the device has */
#define NUMCOLORS 24 /* Number of colors the device supports */
#define PDEVICESIZE 26 /* Size required for device descriptor */
#define CURVECAPS 28 /* Curve capabilities */
#define LINECAPS 30 /* Line capabilities */
#define POLYGONALCAPS 32 /* Polygonal capabilities */
#define TEXTCAPS 34 /* Text capabilities */
#define CLIPCAPS 36 /* Clipping capabilities */
#define RASTERCAPS 38 /* Bitblt capabilities */
#define ASPECTX 40 /* Length of the X leg */
#define ASPECTY 42 /* Length of the Y leg */
#define ASPECTXY 44 /* Length of the hypotenuse */
#if(WINVER >= 0x0500)
#define SHADEBLENDCAPS 45 /* Shading and blending caps */
#endif /* WINVER >= 0x0500 */
#define LOGPIXELSX 88 /* Logical pixels/inch in X */
#define LOGPIXELSY 90 /* Logical pixels/inch in Y */
#define SIZEPALETTE 104 /* Number of entries in physical palette */
#define NUMRESERVED 106 /* Number of reserved entries in palette */
#define COLORRES 108 /* Actual color resolution */
// Printing related DeviceCaps. These replace the appropriate Escapes
#define PHYSICALWIDTH 110 /* Physical Width in device units */
#define PHYSICALHEIGHT 111 /* Physical Height in device units */
#define PHYSICALOFFSETX 112 /* Physical Printable Area x margin */
#define PHYSICALOFFSETY 113 /* Physical Printable Area y margin */
#define SCALINGFACTORX 114 /* Scaling factor x */
#define SCALINGFACTORY 115 /* Scaling factor y */
// Display driver specific
#define VREFRESH 116 /* Current vertical refresh rate of the */
/* display device (for displays only) in Hz*/
#define DESKTOPVERTRES 117 /* Horizontal width of entire desktop in */
/* pixels */
#define DESKTOPHORZRES 118 /* Vertical height of entire desktop in */
/* pixels */
#define BLTALIGNMENT 119 /* Preferred blt alignment */
#ifndef NOGDICAPMASKS
/* Device Capability Masks: */
/* Device Technologies */
#define DT_PLOTTER 0 /* Vector plotter */
#define DT_RASDISPLAY 1 /* Raster display */
#define DT_RASPRINTER 2 /* Raster printer */
#define DT_RASCAMERA 3 /* Raster camera */
#define DT_CHARSTREAM 4 /* Character-stream, PLP */
#define DT_METAFILE 5 /* Metafile, VDM */
#define DT_DISPFILE 6 /* Display-file */
/* Curve Capabilities */
#define CC_NONE 0 /* Curves not supported */
#define CC_CIRCLES 1 /* Can do circles */
#define CC_PIE 2 /* Can do pie wedges */
#define CC_CHORD 4 /* Can do chord arcs */
#define CC_ELLIPSES 8 /* Can do ellipese */
#define CC_WIDE 16 /* Can do wide lines */
#define CC_STYLED 32 /* Can do styled lines */
#define CC_WIDESTYLED 64 /* Can do wide styled lines */
#define CC_INTERIORS 128 /* Can do interiors */
#define CC_ROUNDRECT 256 /* */
/* Line Capabilities */
#define LC_NONE 0 /* Lines not supported */
#define LC_POLYLINE 2 /* Can do polylines */
#define LC_MARKER 4 /* Can do markers */
#define LC_POLYMARKER 8 /* Can do polymarkers */
#define LC_WIDE 16 /* Can do wide lines */
#define LC_STYLED 32 /* Can do styled lines */
#define LC_WIDESTYLED 64 /* Can do wide styled lines */
#define LC_INTERIORS 128 /* Can do interiors */
/* Polygonal Capabilities */
#define PC_NONE 0 /* Polygonals not supported */
#define PC_POLYGON 1 /* Can do polygons */
#define PC_RECTANGLE 2 /* Can do rectangles */
#define PC_WINDPOLYGON 4 /* Can do winding polygons */
#define PC_TRAPEZOID 4 /* Can do trapezoids */
#define PC_SCANLINE 8 /* Can do scanlines */
#define PC_WIDE 16 /* Can do wide borders */
#define PC_STYLED 32 /* Can do styled borders */
#define PC_WIDESTYLED 64 /* Can do wide styled borders */
#define PC_INTERIORS 128 /* Can do interiors */
#define PC_POLYPOLYGON 256 /* Can do polypolygons */
#define PC_PATHS 512 /* Can do paths */
/* Clipping Capabilities */
#define CP_NONE 0 /* No clipping of output */
#define CP_RECTANGLE 1 /* Output clipped to rects */
#define CP_REGION 2 /* obsolete */
/* Text Capabilities */
#define TC_OP_CHARACTER 0x00000001 /* Can do OutputPrecision CHARACTER */
#define TC_OP_STROKE 0x00000002 /* Can do OutputPrecision STROKE */
#define TC_CP_STROKE 0x00000004 /* Can do ClipPrecision STROKE */
#define TC_CR_90 0x00000008 /* Can do CharRotAbility 90 */
#define TC_CR_ANY 0x00000010 /* Can do CharRotAbility ANY */
#define TC_SF_X_YINDEP 0x00000020 /* Can do ScaleFreedom X_YINDEPENDENT */
#define TC_SA_DOUBLE 0x00000040 /* Can do ScaleAbility DOUBLE */
#define TC_SA_INTEGER 0x00000080 /* Can do ScaleAbility INTEGER */
#define TC_SA_CONTIN 0x00000100 /* Can do ScaleAbility CONTINUOUS */
#define TC_EA_DOUBLE 0x00000200 /* Can do EmboldenAbility DOUBLE */
#define TC_IA_ABLE 0x00000400 /* Can do ItalisizeAbility ABLE */
#define TC_UA_ABLE 0x00000800 /* Can do UnderlineAbility ABLE */
#define TC_SO_ABLE 0x00001000 /* Can do StrikeOutAbility ABLE */
#define TC_RA_ABLE 0x00002000 /* Can do RasterFontAble ABLE */
#define TC_VA_ABLE 0x00004000 /* Can do VectorFontAble ABLE */
#define TC_RESERVED 0x00008000
#define TC_SCROLLBLT 0x00010000 /* Don't do text scroll with blt */
#endif /* NOGDICAPMASKS */
/* Raster Capabilities */
#define RC_NONE
#define RC_BITBLT 1 /* Can do standard BLT. */
#define RC_BANDING 2 /* Device requires banding support */
#define RC_SCALING 4 /* Device requires scaling support */
#define RC_BITMAP64 8 /* Device can support >64K bitmap */
#define RC_GDI20_OUTPUT 0x0010 /* has 2.0 output calls */
#define RC_GDI20_STATE 0x0020
#define RC_SAVEBITMAP 0x0040
#define RC_DI_BITMAP 0x0080 /* supports DIB to memory */
#define RC_PALETTE 0x0100 /* supports a palette */
#define RC_DIBTODEV 0x0200 /* supports DIBitsToDevice */
#define RC_BIGFONT 0x0400 /* supports >64K fonts */
#define RC_STRETCHBLT 0x0800 /* supports StretchBlt */
#define RC_FLOODFILL 0x1000 /* supports FloodFill */
#define RC_STRETCHDIB 0x2000 /* supports StretchDIBits */
#define RC_OP_DX_OUTPUT 0x4000
#define RC_DEVBITS 0x8000
#if(WINVER >= 0x0500)
/* Shading and blending caps */
#define SB_NONE 0x00000000
#define SB_CONST_ALPHA 0x00000001
#define SB_PIXEL_ALPHA 0x00000002
#define SB_PREMULT_ALPHA 0x00000004
#define SB_GRAD_RECT 0x00000010
#define SB_GRAD_TRI 0x00000020
#endif /* WINVER >= 0x0500 */
/* DIB color table identifiers */
#define DIB_RGB_COLORS 0 /* color table in RGBs */
#define DIB_PAL_COLORS 1 /* color table in palette indices */
/* constants for Get/SetSystemPaletteUse() */
#define SYSPAL_ERROR 0
#define SYSPAL_STATIC 1
#define SYSPAL_NOSTATIC 2
#define SYSPAL_NOSTATIC256 3
/* constants for CreateDIBitmap */
#define CBM_INIT 0x04L /* initialize bitmap */
/* ExtFloodFill style flags */
#define FLOODFILLBORDER 0
#define FLOODFILLSURFACE 1
/* size of a device name string */
#define CCHDEVICENAME 32
/* size of a form name string */
#define CCHFORMNAME 32
typedef struct _devicemode{
BYTE dmDeviceName[CCHDEVICENAME];
WORD dmSpecVersion;
WORD dmDriverVersion;
WORD dmSize;
WORD dmDriverExtra;
DWORD dmFields;
union {
struct {
short dmOrientation;
short dmPaperSize;
short dmPaperLength;
short dmPaperWidth;
}s;
POINTL dmPosition;
}u;
short dmScale;
short dmCopies;
short dmDefaultSource;
short dmPrintQuality;
short dmColor;
short dmDuplex;
short dmYResolution;
short dmTTOption;
short dmCollate;
BYTE dmFormName[CCHFORMNAME];
WORD dmLogPixels;
DWORD dmBitsPerPel;
DWORD dmPelsWidth;
DWORD dmPelsHeight;
DWORD dmDisplayFlags;
DWORD dmDisplayFrequency;
#if(WINVER >= 0x0400)
DWORD dmICMMethod;
DWORD dmICMIntent;
DWORD dmMediaType;
DWORD dmDitherType;
DWORD dmReserved1;
DWORD dmReserved2;
#if (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400)
DWORD dmPanningWidth;
DWORD dmPanningHeight;
#endif
#endif /* WINVER >= 0x0400 */
} DEVMODE, *PDEVMODE, *NPDEVMODEA, *LPDEVMODE;
/* current version of specification */
#if (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400)
#define DM_SPECVERSION 0x0401
#elif (WINVER >= 0x0400)
#define DM_SPECVERSION 0x0400
#else
#define DM_SPECVERSION 0x0320
#endif /* WINVER */
/* field selection bits */
#define DM_ORIENTATION 0x00000001L
#define DM_PAPERSIZE 0x00000002L
#define DM_PAPERLENGTH 0x00000004L
#define DM_PAPERWIDTH 0x00000008L
#define DM_SCALE 0x00000010L
#if(WINVER >= 0x0500)
#define DM_POSITION 0x00000020L
#endif /* WINVER >= 0x0500 */
#define DM_COPIES 0x00000100L
#define DM_DEFAULTSOURCE 0x00000200L
#define DM_PRINTQUALITY 0x00000400L
#define DM_COLOR 0x00000800L
#define DM_DUPLEX 0x00001000L
#define DM_YRESOLUTION 0x00002000L
#define DM_TTOPTION 0x00004000L
#define DM_COLLATE 0x00008000L
#define DM_FORMNAME 0x00010000L
#define DM_LOGPIXELS 0x00020000L
#define DM_BITSPERPEL 0x00040000L
#define DM_PELSWIDTH 0x00080000L
#define DM_PELSHEIGHT 0x00100000L
#define DM_DISPLAYFLAGS 0x00200000L
#define DM_DISPLAYFREQUENCY 0x00400000L
#if(WINVER >= 0x0400)
#define DM_ICMMETHOD 0x00800000L
#define DM_ICMINTENT 0x01000000L
#define DM_MEDIATYPE 0x02000000L
#define DM_DITHERTYPE 0x04000000L
#define DM_PANNINGWIDTH 0x08000000L
#define DM_PANNINGHEIGHT 0x10000000L
#endif /* WINVER >= 0x0400 */
/* orientation selections */
#define DMORIENT_PORTRAIT 1
#define DMORIENT_LANDSCAPE 2
/* paper selections */
#define DMPAPER_FIRST DMPAPER_LETTER
#define DMPAPER_LETTER 1 /* Letter 8 1/2 x 11 in */
#define DMPAPER_LETTERSMALL 2 /* Letter Small 8 1/2 x 11 in */
#define DMPAPER_TABLOID 3 /* Tabloid 11 x 17 in */
#define DMPAPER_LEDGER 4 /* Ledger 17 x 11 in */
#define DMPAPER_LEGAL 5 /* Legal 8 1/2 x 14 in */
#define DMPAPER_STATEMENT 6 /* Statement 5 1/2 x 8 1/2 in */
#define DMPAPER_EXECUTIVE 7 /* Executive 7 1/4 x 10 1/2 in */
#define DMPAPER_A3 8 /* A3 297 x 420 mm */
#define DMPAPER_A4 9 /* A4 210 x 297 mm */
#define DMPAPER_A4SMALL 10 /* A4 Small 210 x 297 mm */
#define DMPAPER_A5 11 /* A5 148 x 210 mm */
#define DMPAPER_B4 12 /* B4 (JIS) 250 x 354 */
#define DMPAPER_B5 13 /* B5 (JIS) 182 x 257 mm */
#define DMPAPER_FOLIO 14 /* Folio 8 1/2 x 13 in */
#define DMPAPER_QUARTO 15 /* Quarto 215 x 275 mm */
#define DMPAPER_10X14 16 /* 10x14 in */
#define DMPAPER_11X17 17 /* 11x17 in */
#define DMPAPER_NOTE 18 /* Note 8 1/2 x 11 in */
#define DMPAPER_ENV_9 19 /* Envelope #9 3 7/8 x 8 7/8 */
#define DMPAPER_ENV_10 20 /* Envelope #10 4 1/8 x 9 1/2 */
#define DMPAPER_ENV_11 21 /* Envelope #11 4 1/2 x 10 3/8 */
#define DMPAPER_ENV_12 22 /* Envelope #12 4 \276 x 11 */
#define DMPAPER_ENV_14 23 /* Envelope #14 5 x 11 1/2 */
#define DMPAPER_CSHEET 24 /* C size sheet */
#define DMPAPER_DSHEET 25 /* D size sheet */
#define DMPAPER_ESHEET 26 /* E size sheet */
#define DMPAPER_ENV_DL 27 /* Envelope DL 110 x 220mm */
#define DMPAPER_ENV_C5 28 /* Envelope C5 162 x 229 mm */
#define DMPAPER_ENV_C3 29 /* Envelope C3 324 x 458 mm */
#define DMPAPER_ENV_C4 30 /* Envelope C4 229 x 324 mm */
#define DMPAPER_ENV_C6 31 /* Envelope C6 114 x 162 mm */
#define DMPAPER_ENV_C65 32 /* Envelope C65 114 x 229 mm */
#define DMPAPER_ENV_B4 33 /* Envelope B4 250 x 353 mm */
#define DMPAPER_ENV_B5 34 /* Envelope B5 176 x 250 mm */
#define DMPAPER_ENV_B6 35 /* Envelope B6 176 x 125 mm */
#define DMPAPER_ENV_ITALY 36 /* Envelope 110 x 230 mm */
#define DMPAPER_ENV_MONARCH 37 /* Envelope Monarch 3.875 x 7.5 in */
#define DMPAPER_ENV_PERSONAL 38 /* 6 3/4 Envelope 3 5/8 x 6 1/2 in */
#define DMPAPER_FANFOLD_US 39 /* US Std Fanfold 14 7/8 x 11 in */
#define DMPAPER_FANFOLD_STD_GERMAN 40 /* German Std Fanfold 8 1/2 x 12 in */
#define DMPAPER_FANFOLD_LGL_GERMAN 41 /* German Legal Fanfold 8 1/2 x 13 in */
#if(WINVER >= 0x0400)
#define DMPAPER_ISO_B4 42 /* B4 (ISO) 250 x 353 mm */
#define DMPAPER_JAPANESE_POSTCARD 43 /* Japanese Postcard 100 x 148 mm */
#define DMPAPER_9X11 44 /* 9 x 11 in */
#define DMPAPER_10X11 45 /* 10 x 11 in */
#define DMPAPER_15X11 46 /* 15 x 11 in */
#define DMPAPER_ENV_INVITE 47 /* Envelope Invite 220 x 220 mm */
#define DMPAPER_RESERVED_48 48 /* R
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -