[Overview][Types][Procedures and functions][Variables][Index] |
Returns various device specific information.
Source position: winapih.inc line 124
function GetDeviceCaps( |
DC: HDC; |
Index: Integer |
):Integer; |
Returns information about any DC (Device Context), which might be the screen DC representing the monitor, a control canvas or a off-screen bitmap canvas. The following constants can be utilized in the index argument:
An example showing how to obtain the screen DPI for the X axis using GetDeviceCaps, which is the method utilized by TScreen.PixelsPerInch:
var DC: HDC; begin DC := GetDC(0); FDPI := GetDeviceCaps(DC,LOGPIXELSX); // DPI in pixels per inch ReleaseDC(0, DC); end;
|
The number of screen pixels per virtual inch (DPI) for the screen. |
|
|
Horizontal size in millimeters. |
|
|
Vertical size in millimeters. |
|
|
Horizontal width in pixels for a device context. |
|
|
Number of bits per pixel. |
|
|
Number of color planes. |
|
|
Number of entries in the color palette. |
|
|
The number of pixels per logical inch, in X (horizontal) direction. |
|
|
The number of pixels per logical inch, in Y (vertical) direction. |
|
|
Vertical height in pixels for a device context. |
|
|
Number of reserved entries in the color palette. |
Version 3.2 | Generated 2024-02-25 | Home |