Quantcast
Channel: Windows Desktop Development for Accessibility and Automation forum
Viewing all articles
Browse latest Browse all 585

Why would PhysicalToLogicalPointForPerMonitorDPI fail?

$
0
0

Hi -- I'm trying to use LogicalToPhysicalPointForPerMonitorDPI and PhysicalToLogicalPointForPerMonitorDPI to get other applications' views of the sizes of their windows, regardless of whether my app is running in High DPI mode or not.

So my app creates a full-monitor hidden window; then calls GetWindowRect on the target window; calls LogicalToPhysicalPointForPerMonitorDPI on the corners of that rectangle using my hidden window; and calls PhysicalToLogicalPointForPerMonitorDPI again on the corners using the target window.

The logical-to-physical call, and everything before it, works, but the physical-to-logical call fails. Why would this fail?

The documentation for these functions doesn't give any reasons why the calls would fail.


Viewing all articles
Browse latest Browse all 585

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>