From 74ee7676df5720c1624d79e5cdb3d6fdf29c78f3 Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Thu, 9 Dec 2010 15:11:05 +0100 Subject: Teach win_con.c about scroll wheels --- erts/emulator/drivers/win32/win_con.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'erts/emulator/drivers/win32/win_con.c') diff --git a/erts/emulator/drivers/win32/win_con.c b/erts/emulator/drivers/win32/win_con.c index 2202ca655f..14f7941643 100644 --- a/erts/emulator/drivers/win32/win_con.c +++ b/erts/emulator/drivers/win32/win_con.c @@ -704,6 +704,18 @@ FrameWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) } write_inbuf(&c, 1); return 0; + case WM_MOUSEWHEEL: + { + int delta = GET_WHEEL_DELTA_WPARAM(wParam); + if (delta < 0) { + PostMessage(hClientWnd, WM_VSCROLL, MAKELONG(SB_THUMBTRACK, + (iVscrollPos + 5)),0); + } else { + WORD pos = ((iVscrollPos - 5) < 0) ? 0 : (iVscrollPos - 5); + PostMessage(hClientWnd, WM_VSCROLL, MAKELONG(SB_THUMBTRACK,pos),0); + } + return 0; + } case WM_CHAR: c = (TCHAR)wParam; write_inbuf(&c,1); -- cgit v1.2.3