Mouse_Event strange behavior.
So i got going on my Color aimbot. so far everything is going good, but one thing which confuses me is this:

As you can see on the picture, the function i used returns the Tx Ty (wide and high) which is my resolution, though when i make two int's (X and Y) and set their values to the half of Tx and Ty, then to use them in the mouse even function, it
should(after all i know) set my mouse position to the middle of my screen, but instead it moves down to the right corner of my screen ....
So, I'm guessing it's cause i use it wrong? I should be doing:
Code:
mouse_event(MOUSEEVENTF_RIGHT, x, y, 0, 0);
&
Code:
mouse_event(MOUSEEVENTF_LEFT, x, y, 0, 0);
For some strange reason, the LEFT and RIGHT (Yea, the parameters don't look like that) does not really move my mouse, at all.
Anyways, enough talking here's my code:
Code:
#include <cstdlib>
#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
int Tx = GetSystemMetrics(SM_CXSCREEN);
int Ty = GetSystemMetrics(SM_CYSCREEN);
int x = Tx / 2;
int y = Ty / 2;
cout << x << " x - y " << y << endl;
cout << Tx << " Tx - Ty " << Ty;
mouse_event(MOUSEEVENTF_MOVE, x, y, 0, 0);
cin.get();
return EXIT_SUCCESS;
}