aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2010-12-09 15:11:05 +0100
committerPatrik Nyblom <[email protected]>2010-12-09 15:11:05 +0100
commit74ee7676df5720c1624d79e5cdb3d6fdf29c78f3 (patch)
tree72f44661f6971d624ee6d61a199240657313ef81
parent1d82ce2e4466980e5c360b54722952a30bc3ae50 (diff)
downloadotp-74ee7676df5720c1624d79e5cdb3d6fdf29c78f3.tar.gz
otp-74ee7676df5720c1624d79e5cdb3d6fdf29c78f3.tar.bz2
otp-74ee7676df5720c1624d79e5cdb3d6fdf29c78f3.zip
Teach win_con.c about scroll wheels
-rw-r--r--erts/emulator/drivers/win32/win_con.c12
1 files changed, 12 insertions, 0 deletions
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);