Advertisement
Guest User

Untitled

a guest
Nov 10th, 2011
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. // For widget/src/windows/nsWindow.cpp, in nsWindow::DispatchMouseEvent
  2.  
  3. RECT windowRect;
  4. ::GetWindowRect(mWnd, &windowRect);
  5. nsIntPoint mousePos;
  6. mousePos.x = windowRect.right/2;
  7. mousePos.y = windowRect.bottom/2;
  8. RECT mouseRect = { mousePos.x, mousePos.y, mousePos.x, mousePos.y };
  9. ClipCursor(&mouseRect); // Forces the mouse to be only within that rectangle on the screen, giving it no width and height means it's locked.
  10.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement