title: How to get the cursor position
body: <p>I want to know how to get the cursor position on Windows in c++,</p>
  
  <p>Reasons: I try to move the mouse position on X Y coordinate with the screen information</p>
  
  <p>e.g: i want to set the mouse position in the offset x:576 y:854 on the screen.</p>
  
  <p>The only method that I found for do that is:</p>
  
  <pre><code>mouse_event(MOUSEEVENTF_ABSOLUTE|MOUSEEVENTF_MOVE|MOUSEEVENTF_LEFTDOWN,x,y,0,0);
  </code></pre>
  
  <p>Normally the flag MOUSEEVENTF_ABSOLUTE is to do that but it doesn't work, that's why i try to get the absolute position of the mouse and try to calculate that !</p>
  
  <p>Thank you for your answer !</p>