Skip to content

magicxor/WinSyncScroll

Repository files navigation

WinSyncScroll

Scroll two windows simultaneously

release

Demo

notepad_notepad.mp4
chromium_vscode.mp4

How it works

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.

Configuration

The program reads the configuration from the appsettings.json file. The configuration file must be in the same directory as the executable file.

Legacy mode

When "IsLegacyModeEnabled": true, the program uses SendMessage (instead of SendInput) to send the WM_MOUSEWHEEL (or WM_MOUSEHWHEEL) message to the target window.

Strict process id check

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.

See also: