views:

28

answers:

0

I want to be able to read the top level class of a clicked component in another process, ie.which type class instance the clicked control is. The class type then needs to be used for some Automation tasks. So far, I have a Windows hook that will give me the XY coordinates. Then, I can get the IntPtr handle of the control, but this will not help me get the name of the class, as described in this question: http://stackoverflow.com/questions/3905272/get-component-type-of-custom-net-class-from-window-handle

Winapi GetClassName() has not worked either since I get the base class. I've also tried casting to AutomationElement using FromPoint() but this does not help me find which instance the control is. Does anyone have any other ideas of what I could try?
Thanks.