From b3246f94ce74b68e5cde1de733e199ae288ace2d Mon Sep 17 00:00:00 2001 From: vincents Date: Thu, 7 Jun 2007 13:43:43 +0000 Subject: [PATCH] win32 interface: fixed scroll wheel message in a listbox (bug #9018) git-svn-id: trunk@11294 - --- lcl/interfaces/win32/win32callback.inc | 18 +++++++----------- lcl/interfaces/win32/win32winapi.inc | 7 +++++++ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/lcl/interfaces/win32/win32callback.inc b/lcl/interfaces/win32/win32callback.inc index 4bd8dc6bd0..5fddc17bf8 100644 --- a/lcl/interfaces/win32/win32callback.inc +++ b/lcl/interfaces/win32/win32callback.inc @@ -1607,17 +1607,13 @@ begin end; // the mousewheel message is for us - // windows handles combobox's mousewheel messages - if (lWinControl=nil) or (lWinControl.FCompStyle <> csComboBox) then - begin - Msg := LM_MOUSEWHEEL; - Button := LOWORD(WParam); - WheelDelta := SmallInt(HIWORD(WParam)); - State := GetShiftState; - Result := 0; - UserData := Pointer(GetWindowLong(Window, GWL_USERDATA)); - WinProcess := false; - end; + Msg := LM_MOUSEWHEEL; + Button := LOWORD(WParam); + WheelDelta := SmallInt(HIWORD(WParam)); + State := GetShiftState; + Result := 0; + UserData := Pointer(GetWindowLong(Window, GWL_USERDATA)); + WinProcess := false; end; end; {$IFDEF EnableWMDropFiles} diff --git a/lcl/interfaces/win32/win32winapi.inc b/lcl/interfaces/win32/win32winapi.inc index e6d6737d40..b1a6af04e6 100644 --- a/lcl/interfaces/win32/win32winapi.inc +++ b/lcl/interfaces/win32/win32winapi.inc @@ -161,6 +161,13 @@ var if not TWinControl(Sender).HandleAllocated then exit; + with TLMessage(Message) do begin + Result := CallDefaultWindowProc(Handle, Msg, WParam, LParam); + // Windows handled it, so exit here. + if Result<>0 then exit; + end; + + // send scroll message FillChar(ScrollInfo, sizeof(ScrollInfo), #0); ScrollInfo.cbSize := sizeof(ScrollInfo);