C++ mouse_event not working inside games

Posts 1–4 of 4 · Page 1 of 1
C++ mouse_event not working inside games
Hey guys Just finished working on a no recoil program using mouse_event and setcursorpos. The program does exactly what I want (push the cursor down ) However when I run this application and go into a game , the game is not affected by it. Iam not to sure what Iam doing wrong go easy on me.
Thanks in advanced

Btw this is done in c++
Try the following;

Code:
void mouse_move(int x, int y)
{
    INPUT input;
    input.type = INPUT_MOUSE;
    input.mi.mouseData = 0;
    input.mi.time = 0;
    input.mi.dx = x;
    input.mi.dy = y;
    input.mi.dwFlags = MOUSEEVENTF_MOVE | MOUSEEVENTF_VIRTUALDESK | MOUSEEVENTF_ABSOLUTE;
    SendInput(1, &input, sizeof(input));
}
I haven't tested this as I'm not behind a computer with visual studio on it. Look at https://msdn.microsoft.com/en-us/librarydows/desktop/ms646273(v=vs.85).aspx for reference.
Thanks for the help bro much appreciated
Try to find pitch and yaw addresses for control x and y
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us