Moving the cursor in C

Started by
3 comments, last by slip 21 years, 3 months ago
I looked around the net but couldn''t find anything that really answered my question. By using C is there some call I can make in my program to move the mouse cursor by a set amount on the x or y axis under windows? for example if I want to move the cursor 1 pixle to the left I would want to call something like: mouse_move_X(1,0); or something along those lines. Can I also send a mose click command to windows too? I have to following included: #include <windows.h> #include <stdio.h> slip thanks in advance
www.ice-d.com
Advertisement
SetCursorPosThe SetCursorPos function moves the cursor to the specifiedscreen coordinates. If the new coordinates are not within thescreen rectangle set by the most recent ClipCursor function,the system automatically adjusts the coordinates so that thecursor stays within the rectangle. BOOL SetCursorPos(  int X,  // horizontal position  int Y   // vertical position);   

- Andy Oxfeld

[edited by - AndyOxfeld on December 25, 2002 10:46:42 PM]

[edited by - AndyOxfeld on December 25, 2002 10:47:04 PM]
Cool thanks for that. I''ve got it working nice.
what about sending a mouse click command?
slip
thanks again
www.ice-d.com
mouse_event
sweet
thanks a lot guys
www.ice-d.com

This topic is closed to new replies.

Advertisement