On Tue May 14 15:18:38 2024 +0000, Rémi Bernon wrote:
if ((msg == WM_LBUTTONDOWN) || (msg == WM_SYSTIMER)) { send_message( owner_hwnd, vertical ? WM_VSCROLL : WM_HSCROLL, SB_LINEUP, (LPARAM)ctl_hwnd ); NtUserSetSystemTimer( hwnd, SCROLL_TIMER, msg == WM_LBUTTONDOWN ? SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY ); }
Wouldn't something like that (same below) be better?
Probably. But I just noticed an issue with both those approaches: When holding the mouse down on e.g. the bottom arrow and then moving the mouse to leave the arrow it stops scrolling (all good so far). But when moving back in it should continue scrolling, so we do have to handle mouse move somehow...