If you #include <windows.h> you can use the GetCursorPos and SetCursorPos functions to find and change the mouse position (respectively). If you google them, you'll see what kind of parameters they need.
You can use:
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
to send a mouse-click, but don't forget to also use:
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
to simulate letting go of the mouse afterwards.
As long as you know how to get input from the controller, that should get you all set up.
Superku taught me those tricks, and I found them very useful for my game
Jibb