I often use Spy++ to find the class name of a component and in a recent larger project I was making for a client I needed to add such a tool and since I'm not allowed to redistribute Spy++ (and I didn't need all of the functionallaty anyway) I had to create one myself, and here it is.
![]()
It only contains one small form (and a handy mouse class that you can use to move the mouse pointer around and click or double click wherever you want through code) that stays on top of all others while running (if you don't minimize it of course). By dragging the small magnifying glass icon around you will get the window handle, class name, and the text (if any) of the window or control the mouse is currently over. Just like Spy++ this app will also draw a border around the control you're currently over so you can clearly see that you've picked the correct one.
The project is well commented but feel free to post any question you might have about it.




Reply With Quote