C
C#16mo ago
Pandetthe

❔ Restricting mouse movement

Hi!, I am trying to restrict mouse movement on the area of the whole screen. I am using SetWindowsHookEx for LowLevelMouseProc. For checking monitor area I am using GetMonitorInfo, and here is my problem. When all screens have the same dpi, everything is fine, if primary screen have scaling 125%, and screen where I want to restrict movement 100%, everything is fine but if primary has 100% and second has 125%, boundaries of the screen are wrong.
4 Replies
Jester
Jester16mo ago
Miscellaneous Mouse Operations - Win32 apps
The previous sections have discussed mouse clicks and mouse movement. Here are some other operations that can be performed with the mouse.
Jester
Jester16mo ago
all these functions work with pixels and not dpi so you will have to find a solution for that later
Pandetthe
PandettheOP16mo ago
It's not what I am looking for I want to restrict a mouse movement on specified screen, but allow on others I have working mouse movement restrictor, but I don't know how to get proper dpi aware coordinates of screen
Accord
Accord16mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server