Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between WindowFromPhysicalPoint and WindowFromPoint?

Tags:

winapi

WindowFromPhysicalPoint is new with Vista. Its documentation is almost identical to WindowFromPoint. What's the difference? Both seem to take an absolute point (offset from screen origin) and return the topmost (Z order) HWND that contains the point.

like image 400
MSalters Avatar asked Dec 01 '10 13:12

MSalters


1 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 non-dots per inch (dpi) aware windows when the display is high dpi. The window seen on the screen corresponds to the physical coordinates. The application continues to work in logical space. Therefore, the application's view of the window is different from that which appears on the screen. For scaled windows, logical and physical coordinates are different.

like image 78
Alex F Avatar answered Nov 17 '22 11:11

Alex F