delphi GetDeviceCaps function

GetDeviceCaps Function: This function retrieves the designation information of the specified unit. Function Prototype: int GetDeviceCaps (HDC hdc, int nlndex); Parameters:   . 1, HDC: the handle to the device context.   2, nIndex: Returns the specified item, the parameter a takes the following value. (C ++)   DRIVERVERSION: device driver version.   TECHNOLOGY: technical equipment, which may be one of the following values:   DT_PLOTTER: vector plotter; DT_RASDISPLAY: raster display;   DT_RASPRINTER: raster printers; DT_RASCAMERA: Camera grating;   DT_CHARSTREAM: character stream; DT_METAFILE: Metafile;   DT_DISPFILE: a display file.   If the hdc parameter specifies the metafile device context, the technical equipment is to CreateEnhMetaFile function of the number of reference devices, using GetObjectType function can determine if it is an enhanced metafile device context.   HORZSIZE: the width of the physical screen (mm); VERTSIZE: physical screen height (mm); HORZRES: width of the screen (in pixels);   VERTRES: height of the screen (raster line); the LOGPIXELSX: along the width of the screen per logical inch number of pixels in the multi-display system, which displays the same value;  LOGPIXELSY: number of pixels per screen height direction logic inch, the multi-display system, the display of the same value;
  














  

  BITSPIXEL: color bit connected pixels; PLANES: color bit plane; NUMBRUSHES: device number specified with brush;
  NUMPENS: Items specified device; NUMFONTS: the device to specify the number of fonts;
  numColors: Number inlet device color table, if the color device no more than 8 pixels deep. For color depths over device returns -1;
  ASPectX: width of the device relative to the pixel of the image line; ASPECTY: the relative height of the apparatus for drawing a line of pixels;
  ASPECTXY: width of the device for the diagonal pixel line drawing ; PDEVLCESIZE: reserved;
  CLIDCAPS: flag display device supports shear properties. If the device can be cut as a rectangle, it was 1, otherwise 0;
  SIZEPALETTE: the index value is the number of entries in the system palette, is provided only RASTERCAPS RC PALETFE bit index in the device driver is valid.
And the index value is used only for the 16-bit Windows driver;
  NUMRESERVED: the number of entries in the system palette retained only if the device driver is provided RC PALETFE RASTERLAP bit index, the index value is there
valid and the only the index value can be 16-bit Windows drive;
  COLORRES: the actual image of the actual position of the color of the device, only the device driver provided RCPALETFE RASTERLAP bit index, the index value and the index is valid
index value for only 16 bit Windows driver; PHYSICALWIDTH : for printing apparatus, a physical page as the width of the device unit. For example, a physical printer device is set at 8.5 * 600dpi single sheet 11 bit wide value of 5100, note that the physical page is always greater than the printable area of the page, and never less than;
  

  PHYSICALHEIGHT : physical page as the width of the device unit. In the example, a sheet 11 is set to 8.5 * 600dpi printer device is a physical unit height 6600; PHYSICALOFFSETX : For the printing apparatus, the distance from the left to the right of the physical page to the printed page, for example, in a paper is set to 8.5 * 11 600dpi printer, can not print beyond the left at 0.25, and the horizontal displacement of a physical backup unit 150; PHYSICALOFFSETY ; for the printing apparatus. From the above physical page to print the page from the upper side. For example, a printing paper is set to 8.5 * 11 of the printer, not hit at places beyond the upper side, and there is a physical displacement device unit;   VREFRESH: the Windows NT: the display device. Device current vertical refresh rate of the number of cycles per second refresh rate shown represent 1 or 0 default hardware refresh rate, this default refresh rate is typically changed by setting jumpers graphics card or motherboard, or by an display using the Win32 function ChangeDisplay setting such a configuration program to set;   DESKTOPHORZRES: the Windows NT: the width in pixels of a visual desktop. If the device supports a dual desktop or visual display may be greater than this value VERTRES;   SCALINGFACTORX: Printer x-axis scale factor; SCALINGFACTORY: Printer y-axis scale factor.   BLTALIGNMENT: in Windows NT as a horizontal adjustment of the drawing multiple pixels, drawing for best operation, the window drawing this should be a multiple of the horizontal adjustment value. 0 to accelerate the display device, and using any adjustments.
  

  







  SHADEBLENDCAPS: In Windows 98, Windows NT 5.0 and later versions of this value shows the shadows and mixing characteristics of the device.
  SB_CONST_ALPHA: Source constantAlpha processing element BLENDFUNCTION structure, and the number of parameters specified by the blendFunction in AlphaBlend;
  SB_GRAD_RECT: Gradientfill capacity filled rectangle. SB_GRAD_TRI; ability Gradientfill filled triangles;
  SB_NONE: a device without any support for these features. SB_PIXEL_ALPHA: Processing AlphaBlond each pixel Alphx;
  SB_PREMULT_ALPHA: the alpha premultiplied in the Alphablend;
  the RASTERCAPS: the device supports the grating properties, may be some combination of the following values;
  RC_BANDING: joint support needs. RC_BITBLT: support the transmission of bitmap.
  RC_BITMAP64: support more than 64K bits of FIG. RC_DI_BITMAP: Support SetDIBits and GetDIBits function.
  RC_DIBTODEV: SetDIBits To Device Support function; RC_FLOODFILL: support continuous filling
  RC_GDI20_OUTPUT: support 16-bit Windows 2.0 wherein; RC_PALETTE: Specifies a palette-based device.
  RC_SCALING: supports zooming; RC_STRETCHBLT: support the StretchBlt function.
  RC_STRETCHDIB: stretchDIBits function.
  CURVECAPS: graph performance device supports, may be some combination of the following values.
  CC_NONE: does not support drawing curves; CC_CHORD: Support draw strings; CC_CIRCLES: Support to draw a circle.
  CC_ELLIPSES: drawing an elliptical support; CC_INTERIORS: Support internal filling; CC_PIE: Support fan drawing FIG.
  CC_ROUNDRECT: Support drawing rounded rectangle; CC_STYLED: Plotting the support border style.
  CC_WIDE: supports boundary drawn wide; CC_WIDESTYLED: drawing wide support, boundary strip style.
  LINECAPS objects supported by the device performance may be some combination of the following values:
  LC_NONE: does not support drawing lines; LC_INTERIORS: Support internal filling; LC_MARKER: Support drawing tag.
  LC_POLYLINE: Support polyline; LC_POLYMARKER: supports various tags; LC_STYLED: line style belt.
  LC_WIDE: Support wide line drawing; LC_WIDESTYLED: support a wide band segment style.
  POLYGONALCAPS has a polygon performance support. It may be some combination of the following values.
  PC_NONE: draw a polygon is not supported; PC_INTERIORS: Support internal filling; PC_POLYGON: Drawing of spaced support filled polygons.
  PC_RECTANGLE: Support rectangle is drawn; PC_SCANLINE: Support scan line drawing; PC_STYLED: Plotting the support border style.
  PC_WIDE: Support drawing wide boundaries; PC_WIDESTYLED: supports painting style with a wide border.
  PC_WINDPOLYGON: Support draws a polyline type, filled polygons.
  TEXTCAPS text properties supported by the device, may be some combination of the following values:
  TC_OP_CHARACTER: supported character output precision; TC_OP_STROKE: Support stroke output precision.
  TC_CP_STROKE: Support stroke cutting precision; TC_CR_90: supported character by 90 degree rotation;
  TC_CR_ANY: Support for arbitrary rotation angle character; TC_SF_X_YINDEP: Support independent scaling the x and y directions.
  TC_SA_DOUBLE: support the characters zoom doubled; TC_SA_INTEGER: Support integer multiple scaling.
  TC_SA_CONTIN: support to any strict zoom multiples; TC_EA_DOUBLE: Support character increased.
  TC_IA_ABLE: support italic; TC_UA_ABLE: Support underline; TC_SO_ABLE: support strikeout.
  TC_RA_ABLE: supports raster fonts; TC_VA_ABLE: support vector fonts; TC_RESERVED: Reserved, must be zero.
  TC_SCROLLBLT: do not support the use of bits to scroll fast delivery, note that this may backfire.
  The above is C ++ some parameters, provided in C # specific values of some parameters following
  all types are declared as Int or INT32 to
  DRIVERVERSION = 0
  TECHNOLOGY = 2
  the HORZSIZE =. 4
  VERTSIZE =. 6
  the HORZRES =. 8
  VERTRES = 10
  BITSPIXEL = 12 is
  to PLANES = 14
  NUMBRUSHES = 16
  NUMPENS = 18
  NUMMARKERS = 20
  NUMFONTS = 22
  NUMCOLORS = 24
  PDEVICESIZE = 26
  CURVECAPS = 28
  LINECAPS = 30
  POLYGONALCAPS = 32
  TEXTCAPS = 34
  CLIPCAPS = 36
  RASTERCAPS = 38
  ASPECTX = 40
  ASPECTY = 42
  ASPECTXY = 44
  SHADEBLENDCAPS = 45
  LOGPIXELSX = 88
  LOGPIXELSY = 90
  SIZEPALETTE = 104
  NUMRESERVED = 106
  COLORRES = 108
  PHYSICALWIDTH = 110
  PHYSICALHEIGHT = 111
  PHYSICALOFFSETX = 112
  PHYSICALOFFSETY = 113
  SCALINGFACTORX = 114
  SCALINGFACTORY = 115
  VREFRESH = 116
  = 117 DESKTOPVERTRES
  DESKTOPHORZRES = 1 18
  BLTALIGNMENT = 119
  Return Value: returns the value of the specified value of the desired item.
  Notes: GetDeviceCaps following six index to replace the printer disappeared.
  PHYSICALWIDTH GETPHYSPAGESIZE; PHYSICALHEIGHT GETPHYSPAGESIZE
  PHYSICALOFFSETX GETPRINTINGOFFSET;
  PHYSICALOFFSETY GETPHYSICALOFFSET;
  SCALINGFACTORX GETSCALINGFACTOR;
  SCALINGFACTORY GETSCALINGFACTOR;
  the Windows the CE: the Windows the CE does not support the nIndex parameter takes the following values:
  VREFRESH; DESKTOPHORZRES; DESKTOPVERTRES; BLTALIGNMENT
  the Windows the CE 1.0 does not support nIndex parameter takes the following values:
  PHYSICALWIDTH; PHYSICALHEIGHT; PHYSICALOFFSETX; PHYSICALOFFSETY
  Quick: Windows NT: 3.1 or later; Windows: 95 or later; Windows CE: 1.0 and above; the header file: wingdi.h; library: gdi32.lib.
  Supplementary:
  GetDeviceCaps (the HORZSIZE) 
  HORZSIZE millimeters width of the display 
  VERTSIZE millimeters display height 
  display width HORZRES pixels of 0 ~ 65535
  VERTRES pixels display height 0 ~ 65535
  the LOGPIXELSX pixel / logical inch (horizontal) 
  LOGPIXELSY pixels / logic inch (vertical)

 

Guess you like

Origin www.cnblogs.com/guorongtao/p/11622296.html