Dreikblack Posted May 4, 2024 Posted May 4, 2024 Code snippet how i manage to do in in OpenGL loop if (hwnd == GetActiveWindow()) { static RECT oldRect; RECT newRect; GetWindowRect(hwnd, &newRect); if (memcmp(&oldRect, &newRect, sizeof(RECT)) == 0) { ClipCursor(&newRect); } oldRect = newRect; } 1 Quote
SpiderPig Posted May 4, 2024 Posted May 4, 2024 Yes this would be good. Window::ClipCursor() maybe? Quote
Josh Posted May 4, 2024 Posted May 4, 2024 What would you use this for? If the window is fullscreen, you have nothing to worry about. If the window is not fullscreen, you presumably want to be able to click on another window to select it. Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Dreikblack Posted May 4, 2024 Author Posted May 4, 2024 Even with fullscreen cursor going out of window which can be annoying for moving camera by putting cursor near screen border in tactic and strategy games, I want to have it as an option game settings. Quote
Josh Posted May 4, 2024 Posted May 4, 2024 If it's fullscreen, how can the cursor go outside the window? Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Josh Posted May 4, 2024 Posted May 4, 2024 With multiple monitors? Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Josh Posted May 4, 2024 Posted May 4, 2024 That makes a lot more sense now. Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.