I installed a low-level mousehook (WH_MOUSE_LL) to get the correct screen cursor position on a mixed HiDpi system (two monitors) (the application itself is not HiDpi aware). How can I change the mouse position in code so that the hook is called as well. Ultimately I just want to pick a color on the screen of a multi-monitor solution from a non-HiDpi-aware application, with the resolutions and scalings of the monitors being different. I would also like to be able to move the cursor with pixel precision using the cursor keys.
I've tried SetCursorPos() and SetPhysicalCursorPos(). In both cases, the cursor position is changed, but the hook is not called. I have not found any way to map then HigDpi-coordinates received in the low-level-mousehook to my non HigDpi-aware application.