   Help with getting mouse input
  So, I'm trying to get my camera class to move along with the mouse (the way mice control the camera in most first-person-shooters) I figured i would just move the mouse cursor the the center of the window each frame. I record that center position in the variables dmouseX and dmouseY. (the center isn't (0,0) it's the windows width/2 and the window's height/2 respectively) Then, each time the user moves the mouse, the new location is recorded during my window's callback function into the var's mouseX and mouseY. I calc the difference between the dmouse* and mouse* vars and then rotate the camera by that amount. So here's what my code looks like:#define MOUSE_THRESHOLD 5void Update (DWORD milliseconds)  // Perform Motion Updates Here{  if (dmouseX != g_window->mouseX || dmouseY != g_window->mouseY)  {dmouseX-= g_window->mouseX;dmouseY-= g_window->mouseY;//rotate the cameraif(abs(dmouseX)>MOUSE_THRESHOLD)   m_Camera.RotateCamera((float)dmouseX/300,0.0f);if(abs(dmouseY)>MOUSE_THRESHOLD)m_Camera.RotateCamera(0.0f,(float)dmouseY/300);RECT *lp = new RECT();//pointer to rectangle infoGetWindowRect(g_window->hWnd,lp);dmouseX = (lp->right/2);dmouseY = (lp->bottom/2);SetCursorPos(dmouseX,dmouseY);//set the cursor to the middle of the screen   }the Horizontal code works fine. but whenever i enable the vertical rotation, the view keeps spinning vertically. Even if i'm not moving the mouse. It seems to spin in the +y direction, and if i pull down hard enough on the mouse i can get it to stop rotating for a few seconds.I cannot for the life of me figure out why horizontal code works so well and vertical...eh...not so much   
  oooo, i hope i didn't post this in the wrong forum. Is this too advanced for "for beginners"? Should i post this question under the forum "Game programming"? sry, let me know.   ;  I don't know about your problem, but I think that you have a memory leak there. I'm not familiar myself with GetWindowRect(), but MSDN says that lp is an 'out' variable. I take that to mean that you do not need to set lp to a new Rect() before passing it. In fact you should *not* do that. Since GetWindowRect actually reseats the pointer, the new-ed Rect is lost forever, polluting memory until your program shuts down.   ;  I'm glad you mentioned it,ezbez, that line of code used to read:RECT *lp;but then the compiler gave me a run-time error: "variable used without being assigned" and when i set the code to read:RECT *lp = NULL;It gave me a memory-index error.What else should i do?Also, in regards to my real problem. I noticed that the mouse input works great in fullscreen, just not in windowed mode :(   