I would like to click given coordinates in an activeX container. Has anyone tackled this before? Any references or clues one can point me to? Regards, Marco.
or...how can i get the screen coordinates from a hwnd? it seens there is a function called 'GetWindowRect' that will do this. i can get the hwnd object as an IDistpatch. how can i call this 'GetWindowRect' function? here is the link to it in the MSDN microsoft site:
Hi,
In WinPack library (http://www.teamdev.com/winpack/index.jsf) there is the appropriate wrapper Wnd class for this HWND type: http://www.teamdev.com/downloads/winpack/javadoc/com/jniwrapper/win32/ui/Wnd.html
And in this Wnd class contains "public Rect getWindowRect()" method which is the wrapper for 'GetWindowRect' function.
You can create Wnd object from any AWT component as well as from a handle. In WinPack demo application there are examples that demonstrate using of this class.
-Serge
I think you can achieve that by sending mouse click events to the specified windows handle. In Wnd class that I mentioned earlier there is 'sendMessage' for this purpose.
-Serge
Thank you Serge. I found a solution and in fact is using the wnd and getbounds as you mentioned. For the clicking I used a java Robot. Thanks again.