mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 15:25:07 +02:00
win32: revert r52438 #4361125363 for TListView and fix WParam parameter. Without it, TListView doesn't scroll (other components scroll happily with forwarded WM_HSCROLL and WM_VSCROLL).
git-svn-id: trunk@53444 -
This commit is contained in:
parent
e620f28fae
commit
05df480e06
@ -180,6 +180,13 @@ var
|
||||
ClientToScreen(Handle, Pos);
|
||||
SystemWParam := Windows.WParam(Longint(PointToSmallPointNoChecks(Pos)));
|
||||
|
||||
if Sender is TListView then
|
||||
begin // we need this workaround to make TListView scroll -> forward WM_MOUSEWHEEL directly to it
|
||||
MMessage^.Result := CallDefaultWindowProc(Handle, MMessage^.Msg, TLMessage(Message).WParam, TLMessage(Message).LParam);
|
||||
// Windows handled it, so exit here.
|
||||
if MMessage^.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