When we use the WindowFromPointwinapi function , we can usually get this case when Point points to some control inside the window. And in such cases, WindowFromPointreturns a handle to this control, and not to the window that processes this control.
For example, in my small test application, if I point to the "body" of the Chrome browser, I get a control with class = Chrome_RenderWidgetHostHWNDand its hwnd.
But I need to get a "parent" window for this control (which obviously should be a chrome window).
source
share