LogicalToPhysicalPointForPerMonitorDPI function

Converts the logical coordinates of a point in a window to physical coordinates, regardless of the DPI awareness level.

Syntax


BOOL LogicalToPhysicalPointForPerMonitorDPI(
  _In_     HWND hwnd,
  _Inout_  LPPOINT lpPoint
);

Parameters

hwnd [in]

A handle to the window whose transform is used for the conversion.

lpPoint [in, out]

A pointer to a POINT structure that specifies the logical coordinates to be converted. The new physical coordinates are copied into this structure if the function succeeds.

Return value

Returns TRUE if successful, or FALSE otherwise.

Remarks

In Windows 8, system–DPI aware applications translate between physical and logical space using PhysicalToLogicalPoint and LogicalToPhysicalPoint. In Windows 8.1, the additional virtualization of the system and inter-process communications means that for the majority of applications, you do not need these APIs. As a result, in Windows 8.1, these APIs no longer transform points. The system returns all points to an application in its own coordinate space. This behavior preserves functionality for the majority of applications, but there are some exceptions in which you must make changes to ensure that the application works as expected. For example, applications for accessibility or developer tools often need to walk the entire window tree of another process. In this case, the application needs actual physical coordinates rather than virtualized physical coordinates and must update to use PhysicalToLogicalPointForPerMonitorDPI and LogicalToPhysicalPointForPerMonitorDPI. These APIs return actual physical coordinates regardless of the DPI awareness level.

Requirements

Minimum supported client

Windows 8.1 [desktop apps only]

Minimum supported server

None supported

Header

Winuser.h

Library

User32.lib

DLL

User32.dll

See also

PhysicalToLogicalPointForPerMonitorDPI

 

 

Community Additions

ADD
Show:
© 2014 Microsoft