   Windows SetCursorPos() relative problem (RESOLVED)
  Hello again.  This time I come with a windows API problem.What I am wanting to do is set the position of the cursor to the center of my client window.Looking through the MSDN documentation the SetCursorPos() function is what I am looking for.  The problem is that the position specified for the parameters are not relative to the client window but the entire screen.  How would I go about getting the position of the upper corner of my client window so I could calculate the center of the client window from there?Thanks![Edited by - Funkyjive on June 21, 2009 7:46:34 PM]
  Just get your cursor position and run it through ScreenToClientPOINT mouse;GetCursorPos(&mouse);ScreenToClient(hWndMain,&mouse); //stores our on screen mouse coordinates;  Im not sure I understand the logic there?  I already can get the location of my mouse in the client window what I want to do is be able to SET it's position in client coordinates.   ;  There's also the function ClientToScreen().   ;  Thank you. For anyone who stumbles across this question in the future here is what now works for me...SetPosition(int x, int y){    POINT pt;    pt.x = x;    pt.y = y;    ClientToScreen(window, &pt);    SetCursorPos(pt.x, pt.y);}Thanks for the help SiCrane!   