What is the difference between WindowFromPhysicalPoint and WindowFromPoint?

WindowFromPhysicalPointis new with Vista. Its documentation is almost identical WindowFromPoint. Who cares? Both seem to take the absolute point (offset from the start of the screen) and return the uppermost (order Z) HWNDthat contains the point.

+5
source share
2 answers

http://msdn.microsoft.com/en-us/library/ms633533(VS.85).aspx

Windows Vista introduces the concept of physical coordinates. Desktop Window Manager (DWM) scales windows with odd dots per inch (dpi) when the display is at a high level of imprint. The window visible on the screen corresponds to the physical coordinates. The application continues to work in a logical space. Therefore, the appearance of the application in the window differs from that displayed on the screen. For scaled windows, the logical and physical coordinates are different.

+3
source

WindowFromPhysicalPointworks in screen coordinates physical, and WindowFromPointworks with logical. To understand the various read this page .

TL DR; version will be:

, ​​ (100, 48). 96 , (100, 48). 120 dpi, (125, 60). dpi: (100, 48).

, DPI aware, logical, API logical . logical - Windows XP.

0

All Articles