Search code examples
c++winapispy++

How does spy++ find out what is the window at a certain point on the screen?


I am curious how spy++ Finder Tool finds out the window handle for the window over which the mouse is. Is there any WIN32 function for getting the handle of the topmost window that occupies a certain pixel on the display?


Solution

  • There is a WindowFromPoint() function.