Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

DPtoLP function

The DPtoLP function converts device coordinates into logical coordinates. The conversion depends on the mapping mode of the device context, the settings of the origins and extents for the window and viewport, and the world transformation.

Syntax


BOOL DPtoLP(
  _In_     HDC     hdc,
  _Inout_  LPPOINT lpPoints,
  _In_     int     nCount
);

Parameters

hdc [in]

A handle to the device context.

lpPoints [in, out]

A pointer to an array of POINT structures. The x- and y-coordinates contained in each POINT structure will be transformed.

nCount [in]

The number of points in the array.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

Remarks

The DPtoLP function fails if the device coordinates exceed 27 bits, or if the converted logical coordinates exceed 32 bits. In the case of such an overflow, the results for all the points are undefined.

Examples

For an example, see Using Coordinate Spaces and Transformations.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Coordinate Spaces and Transformations Overview
Coordinate Space and Transformation Functions
LPtoDP
POINT

 

 

Community Additions

ADD
Show:
© 2015 Microsoft