Jump to: navigation, search

Mouse Lock API Points of Interest

323 bytes removed, 01:16, 11 November 2011
no edit summary
Here's some code that actually locks the mouse into a rectangle with no width or height in the center of the screen in WIN32.
 RECT windowRect;http::GetWindowRect(mWnd, &windowRect);nsIntPoint mousePos;mousePos.x = windowRect.right/2;mousePos.y = windowRect.bottom/2;RECT mouseRect = { mousePos.x, mousePospastebin.y, mousePos.x, mousePos.y };ClipCursor(&mouseRect); com// Forces the mouse to be only within that rectangle on the screen, giving it no width and height means it's locked.gNmh1uhz

Navigation menu