This function retrieves device-specific information about a given display device. The nIndex parameter specifies the type of information desired.
Identifies the device context.
Specifies the item to return. It can be any one of the following values:
HORZSIZE |
Width of the physical display (in millimeters). |
VERTSIZE |
Height of the physical display (in millimeters). |
HORZRES |
Width of the display (in pixels). |
VERTRES |
Height of the display (in raster lines). |
LOGPIXELSX |
Number of pixels per logical inch along the display width. |
LOGPIXELSY |
Number of pixels per logical inch along the display height. |
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 device's color table. |
ASPECTX |
Relative width of a device pixel as used for line drawing. |
ASPECTY |
Relative height of a device pixel as used for line drawing. |
ASPECTXY |
Diagonal width of the device pixel as used for line drawing. |
PDEVICESIZE |
Size of the PDEVICE internal data structure. |
CLIPCAPS |
Flag that indicates the clipping capabilities of the device. It is 1 if the device can clip to a rectangle, 0 if it cannot. |
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 version is 3.0 or higher. |
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 version is 3.0 or higher. |
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 version is 3.0 or higher. |
RASTERCAPS |
Value that indicates the raster capabilities of the device, as shown in the following list: |
Capability |
Meaning |
RC_BANDING |
Requires banding support. |
RC_BITBLT |
Capable of transferring bitmaps. |
RC_BITMAP64 |
Capable of supporting bitmaps larger than 64K. |
RC_DI_BITMAP |
Capable of supporting SetDIBits and GetDIBits. |
RC_DIBTODEV |
Capable of supporting the SetDI-BitsToDevice function. |
RC_FLOODFILL |
Capable of performing flood fills. |
RC_GDI20_OUTPUT |
Capable of supporting Windows version 2.0 features. |
RC_PALETTE |
Palette-based device. |
RC_SCALING |
Capable of scaling. |
RC_STRETCHBLT |
Capable of performing the StretchBlt function. |
RC_STRETCHDIB |
Capable of performing the StretchDIBits function. |
0 |
Device can do character output precision. |
1 |
Device can do stroke output precision. |
2 |
Device can do stroke clip precision. |
3 |
Device can do 90-degree character rotation. |
4 |
Device can do any character rotation. |
5 |
Device can do scaling independent of X and Y. |
6 |
Device can do doubled character for scaling. |
7 |
Device can do integer multiples for scaling. |
8 |
Device can do any multiples for exact scaling. |
9 |
Device can do double-weight characters. |
10 |
Device can do italicizing. |
11 |
Device can do underlining. |
12 |
Device can do strikeouts. |
13 |
Device can do raster fonts. |
14 |
Device can do vector fonts. |
15 |
Reserved. Must be returned zero. |
The return value specifies the value of the desired item.