The only other way I can think of is to get the handle of the window or control at the position you want to click, you could use the WindowFromPoint API for that. Then send the WM_LBUTTONDOWN and WM_LBUTTONUP to that handle.
EDIT: BTW attached is a nice class I wrote that wraps the mouse_event and GetCursorPos. It's easy to use and you can specify point on the screen in pixels instead of absolute mouse coordinates. This could make it easy for you to move, click and the move back if you don't want to use the above mentioned approach.
Last edited by Joacim Andersson; May 12th, 2005 at 05:25 PM.