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? 回答1: There is a WindowFromPoint() function. 回答2: Here is a pretty complete example of how to implement the spy++ finder. http://www.codeproject.com/KB/dialog/windowfinder.aspx 回答3: There is some nice information on the internals of Spy++ here: http://blogs.msdn.com/b/vcblog