From 9d33882a8307d8e00849941e30032d99fc75de43 Mon Sep 17 00:00:00 2001 From: Daniel Mehrmann Date: Mon, 9 Feb 2004 18:49:19 +0000 Subject: [PATCH] Add Mousewheel support for winboard. Play the moves foward and backward with the Mousewheel. --- winboard/winboard.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/winboard/winboard.c b/winboard/winboard.c index 32addcc..69146fc 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -3108,7 +3108,16 @@ MouseEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) dragInfo.lastpos = dragInfo.pos; } break; - + case WM_MOUSEWHEEL: + /* Mouse Wheel is being rolled forward + * Play moves forward + */ + if((short)HIWORD(wParam) > 0 ) ForwardEvent(); + /* Mouse Wheel is being rolled backward + * Play moves backward + */ + if((short)HIWORD(wParam) < 0 ) BackwardEvent(); + break; case WM_MBUTTONDOWN: case WM_RBUTTONDOWN: ErrorPopDown(); @@ -3415,6 +3424,7 @@ WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) case WM_MBUTTONUP: case WM_RBUTTONUP: case WM_MOUSEMOVE: + case WM_MOUSEWHEEL: MouseEvent(hwnd, message, wParam, lParam); break; -- 1.7.0.4