title: SendInput - (mouse movement simulation)
body: <p>I've been trying to simulate a series of inputs into a process.
  The only one I was unsuccessful in achieving is mouse movement.
  I have found the closest bet online: </p>
  
  <pre><code>bool mouse_move(int x, int y)
  {
      INPUT input;
      input.type = INPUT_MOUSE;
      input.mi.mouseData = 0;
      input.mi.time = 0;
      input.mi.dx = x*(65536/GetSystemMetrics(SM_CXSCREEN));//x being coord in pixels
      input.mi.dy = y*(65536/GetSystemMetrics(SM_CYSCREEN));//y being coord in pixels
      input.mi.dwFlags = MOUSEEVENTF_MOVE;//MOUSEEVENTF_ABSOLUTE
      SendInput(1, &amp;input, sizeof(input));
      return true;
  }
  </code></pre>
  
  <p>I did not understand the struct as it was explained online.
  The mouse keeps going to the bottom-right corner of the screen no matter what value I input (except 0 obviously).</p>
  
  <p>It was possible through <code>SetCursorPos()</code> yes, but once I went into the process, that function just didn't work anymore. I need to simulate it as if the user is inputting the mouse movement and so far <code>SendInput()</code> worked. I just can't seem to figure out the positioning.</p>