hello!
I would like to reduce by a factor 100 the ratio of mouse to cursor displacement. I tried thid piece of code (for a factor 10) but it doesn't work:
the cursor jumps continously from pt to pt2.Code:#include <windows.h> int main(int argc, char *argv[]) { static POINT pt; POINT pt2; POINT pt3; BOOL bContinue = TRUE; const SHORT Mask = 32768; GetCursorPos(&pt); while (bContinue) { if (GetKeyState(VK_ESCAPE) & Mask) bContinue = FALSE; GetCursorPos(&pt2); pt3.x = (pt2.x - pt.x)/10 + pt.x; pt3.y = (pt2.y - pt.y)/10 + pt.y; SetCursorPos(pt3.x,pt3.y); GetCursorPos(&pt); Sleep(1); } return 0; }
any idea?
thanks!