mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-07 01:06:02 +02:00
win32 interface: fixed scroll wheel message in a listbox (bug #9018)
git-svn-id: trunk@11294 -
This commit is contained in:
parent
ba3e478722
commit
b3246f94ce
@ -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}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user