Gdi::GetDeviceCaps_I (Windows Embedded CE 6.0)
1/6/2010
This method retrieves information about the capabilities of a specified device.
Syntax
static WINGDIAPI int WINAPI GetDeviceCaps_I(
HDC hdc,
int nIndex
);
Parameters
- hdc
[in] Handle to the device context.
nIndex
[in] Integer that specifies the item to return.The following table shows the possible values.
Value Description DRIVERVERSION
The device driver version.
TECHNOLOGY
Device technology.
The following shows the possible return values is nIndex is set to TECHNOLOGY.
DT_PLOTTER
DT_RASDISPLAY
DT_RASPRINTER
DT_RASCAMERA
DT_CHARSTREAM
DT_DISPFILE
HORZSIZE
Width, in millimeters, of the physical screen.
VERTSIZE
Height, in millimeters, of the physical screen.
HORZRES
Width, in pixels, of the screen.
VERTRES
Height, in raster lines, of the screen.
LOGPIXELSX
Number of pixels per logical inch along the screen width.
In a system with multiple screens, this value is the same for all screens.
LOGPIXELSY
Number of pixels per logical inch along the screen height.
In a system with multiple screens, this value is the same for all screens.
BITSPIXEL
Number of adjacent color bits for each pixel.
PLANES
Number of color planes.
NUMBRUSHES
Number of device-specific brushes.
NUMPENS
Number of device-specific pens.
NUMFONTS
Number of device-specific fonts.
NUMCOLORS
Number of entries in the color table for the device, if the device has a color depth of no more than 8 bits per pixel.
For devices with greater color depths, –1 is returned.
ASPECTX
Relative width of a device pixel used for line drawing.
ASPECTY
Relative height of a device pixel used for line drawing.
ASPECTXY
Diagonal width of the device pixel used for line drawing.
PDEVICESIZE
Reserved.
CLIPCAPS
Flag that indicates the clipping capabilities of the device.
If the device can clip to a rectangle, it is 1. Otherwise, it is 0.
SIZEPALETTE
Number of entries in the system palette.
This index is valid only if the device driver sets the RC_PALETTE bit in the RASTERCAPS index and is available only if the driver is compatible with 16-bit Windows.
NUMRESERVED
Number of reserved entries in the system palette.
This index is valid only if the device driver sets the RC_PALETTE bit in the RASTERCAPS index and is available only if the driver is compatible with 16-bit Windows.
COLORRES
Actual color resolution of the device, in bits per pixel.
This index is valid only if the device driver sets the RC_PALETTE bit in the RASTERCAPS index and is available only if the driver is compatible with 16-bit Windows.
PHYSICALWIDTH
The width of the physical page, in device units, for printing devices.
For example, a printer set to print at 600 dpi on 8.5"x11" paper has a physical width value of 5100 device units.
The physical page is almost always greater than the printable area of the page, and never smaller.
PHYSICALHEIGHT
The height of the physical page, in device units, for printing devices.
For example, a printer set to print at 600 dpi on 8.5"x11" paper has a physical height value of 6600 device units.
The physical page is almost always greater than the printable area of the page, and never smaller.
PHYSICALOFFSETX
The distance from the left edge of the physical page to the left edge of the printable area, in device units, for printing devices.
For example, a printer set to print at 600 dpi on 8.5"x11" paper that cannot print on the leftmost 0.25" of paper has a horizontal physical offset of 150 device units.
PHYSICALOFFSETY
The distance from the top edge of the physical page to the top edge of the printable area, in device units, for printing devices.
For example, a printer set to print at 600 dpi on 8.5"x11" paper that cannot print on the topmost 0.5" of paper has a vertical physical offset of 300 device units.
RASTERCAPS
Value that indicates the raster capabilities of the device.
The following shows the possible return values is nIndex is set to RASTERCAPS.
RC_BANDING
RC_BITBLT
RC_BITMAP64
RC_DI_BITMAP
RC_DIBTODEV
RC_GDI20_OUTPUT
RC_PALETTE
RC_SCALING
RC_STRETCHBLT
RC_STRETCHDIB
CURVECAPS
Value that indicates the curve capabilities of the device.
The following shows the possible return values is nIndex is set to CURVECAPS.
CC_NONE
CC_CHORD
CC_CIRCLES
CC_ELLIPSES
CC_INTERIORS
CC_PIE
CC_ROUNDRECT
CC_STYLED
CC_WIDE
CC_WIDESTYLED
LINECAPS
Value that indicates the line capabilities of the device.
The following shows the possible return values is nIndex is set to LINECAPS.
LC_NONE
LC_INTERIORS
LC_MARKER
LC_POLYLINE
LC_POLYMARKER
LC_STYLED
LC_WIDE
LC_WIDESTYLED
POLYGONALCAPS
Value that indicates the polygon capabilities of the device.
The following shows the possible return values is nIndex is set to POLYGONALCAPS.
PC_NONE
PC_INTERIORS
PC_POLYGON
PC_RECTANGLE
PC_SCANLINE
PC_STYLED
PC_WIDE
PC_WIDESTYLED
PC_WINDPOLYGON
TEXTCAPS
Value that indicates the text capabilities of the device.
The following shows the possible return values is nIndex is set to TEXTCAPS.
TC_OP_CHARACTER
TC_OP_STROKE
TC_CP_STROKE
TC_CR_90
TC_CR_ANY
TC_SF_X_YINDEP
TC_SA_DOUBLE
TC_SA_INTEGER
TC_SA_CONTIN
TC_EA_DOUBLE
TC_IA_ABLE
TC_UA_ABLE
TC_SO_ABLE
TC_RA_ABLE
TC_VA_ABLE
TC_RESERVED
TC_SCROLLBLT
Return Value
Returns the value of the desired item.
Remarks
This method is an internal version of the GetDeviceCaps function.
The following table shows the six indexes that Gdi::GetDeviceCaps_I provides in place of printer escapes.
Index | Printer escape replaced |
---|---|
PHYSICALWIDTH |
GETPHYSPAGESIZE |
PHYSICALHEIGHT |
GETPHYSPAGESIZE |
PHYSICALOFFSETX |
GETPRINTINGOFFSET |
PHYSICALOFFSETY |
GETPHYSICALOFFSET |
Requirements
Header | gdi.hpp |
Windows Embedded CE | Windows CE .NET 4.0 and later |