Guest User

Untitled

a guest
Jan 23rd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. POINT p;
  2. GetCursorPos(&p);
  3.  
  4. MOUSEINPUT mi;
  5. mi.dx = (LONG) ((p.x * 65535) / screen_width);
  6. mi.dy = (LONG) ((p.y * 65535) / screen_height);
  7. mi.mouseData = 0;
  8. mi.dwFlags = type | MOUSEEVENTF_ABSOLUTE;
  9. mi.time = 0;
  10. mi.dwExtraInfo = NULL;
  11.  
  12. INPUT input;
  13. input.type = INPUT_MOUSE;
  14. input.mi = mi;
  15.  
  16. SendInput(1, &input, sizeof(INPUT));
Add Comment
Please, Sign In to add comment