Finding WindowFromPoint - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Finding WindowFromPoint

I want to find a window handle (HWND) when all I have is a mouse point (screen coordinates). I've managed to do pretty well so far but have come into a problem. I can't seem to get a handle on any static text windows.



I'm using WindowFromPoint and ChildWindowFromPoint to get the window handles as of now. I'm basically trying to emulate Microsoft's Spy utility (The Window Finder part anyway).



If anyone knows how I can get a handle on static text windows please let me know. I'm begging, really!


Comments

  • I guess you have to do it the hard way, by using EnumWindows and EnumChildWindows and comparing the window corners against the point.




Sign In or Register to comment.