Scroll two windows simultaneously
https://github.com/user-attachments/assets/ba52c20e-1099-4e20-9b8d-f164d283c639
https://github.com/user-attachments/assets/f2cc2020-cc07-411e-a4c7-7ef227d9cdda
The program uses the SetWindowsHookEx
function to install a hook procedure that monitors low-level mouse events. When the user scrolls the source window, the program uses SendInput
to simulate the same scroll event on the target window.
The program reads the configuration from the appsettings.json
file. The configuration file must be in the same directory as the executable file.
When "IsLegacyModeEnabled": true
, the program uses SendMessage
(instead of SendInput
) to send the WM_MOUSEWHEEL
(or WM_MOUSEHWHEEL
) message to the target window.
When "IsStrictProcessIdCheckEnabled": true
, the program uses WindowFromPoint
+ GetWindowThreadProcessId
to prevent scrolling the target window if the target or source window is currently not in the foreground.