Archived

This topic is now archived and is closed to further replies.

slip

Moving the cursor in C

Recommended Posts

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

Share this post


Link to post
Share on other sites

SetCursorPos


The SetCursorPos function moves the cursor to the specified
screen coordinates. If the new coordinates are not within the
screen rectangle set by the most recent ClipCursor function,
the system automatically adjusts the coordinates so that the
cursor 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]

Share this post


Link to post
Share on other sites