问题
A long time ago I remember using a program where I just moved my mouse around the screen and it displayed the hWnd information (and some other stuff) of the window (and parent, and child) to where you were pointing your mouse. Does anyone know of something like this? I cant find it anymore.
(btw this is windows 7)
Edited: it's not yet any of these, but Winspector seems to do what I want. I remember that it was done by a guy that was a master in window Subclassing in the VB5/6 days
回答1:
Windowse is free, lightweight and great. I use it anytime I don't have an explicit need for the extra functionality the much heavier Spy++ offers.
回答2:
Are you thinking of the Spy++ utility that comes with Visual Studio?
回答3:
What about using GetCursorPos and then use RealChildWindowFromPoint, WindowFromPoint or ChildWindowFromPoint? You maybe want to define a global hook to be informed about all mouse movements.
Update
Btw. if you are sill looking for such a program, I suggest Winspector.
回答4:
Could you be thinking of WinCheat? I use it all the time at work, it's very useful. It does have some of the same features as Spy++, but it makes it easier to get more information about a window, IMO.
来源:https://stackoverflow.com/questions/1111618/discover-hwnd-where-mouse-is