Archived

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

microsoft63

how can I know the position of the mouse's cursor??

Recommended Posts


#include <windows.h>
#include <stdio.h>

int main(int argc,char *argv[]){
POINT p;
if(GetCursorPos(&p)){
printf("Cursor is at %i,%i\n",p.x,p.y);
return 0;
}else{
printf("Couldn't get cursor position\n");
return -1;
}
}



[edited by - TravisWells on May 20, 2004 1:06:48 PM]

Share this post


Link to post
Share on other sites