This function retrieves the resolution from the screen or printer device context.
[C++Builder/Visual
C++] BOOL IKGetDpiFromHdc(HDC hDC,
long *Xdpi, long *Ydpi);
[Delphi] function
IKGetDpiFromHdc(hDC: HDC; var Xdpi, Ydpi: Longint): LongBool;
[Visual Basic] Function
IKGetDpiFromHdc(ByVal hDC As Long, Xdpi As Long, Ydpi As Long) As
Long
Parameters
Name | Explanation |
---|---|
hDC | The Device Context |
Xdpi | The horizontal resolution value. (The number of pixels in one horizontal inch) |
Ydpi | The vertical resolution value. (The number of pixels in one vertical inch) |
Return Value
Returns True (nonzero) if successful, returns False (0) if not successful
Explanation
The IKGetDpiFromHdc method retrieves the resolution from the screen or printer device context. If successful, the horizontal and vertical resolution values are returned in the Xdpi and Ydpi parameters.