SetCursorPos defined as:
BOOL WINAPI SetCursorPos(
_In_ int X,
_In_ int Y
);
So you can use:
Point p;
....some code
SetCursorPos(p.x,p.y);
سؤال
I am writing a program to move mouse pointer using SetCursorPos()
defined in windows.h . The parameters to SetCursorPos
should be int
. I have Point
datastructure obtained from a rectangle. How to convert it?
Thanks in advance :)
المحلول
SetCursorPos defined as:
BOOL WINAPI SetCursorPos(
_In_ int X,
_In_ int Y
);
So you can use:
Point p;
....some code
SetCursorPos(p.x,p.y);