Win32: fix scrolling issue in ListBox with huge amount of items. Patch by Michl. Issue #0023914.

git-svn-id: trunk@52246 -
This commit is contained in:
bart 2016-04-25 10:08:00 +00:00
parent dab7775724
commit 178c43a3f6

View File

@ -815,6 +815,14 @@ begin
if LMScroll.Pos < High(LMScroll.SmallPos)
then LMScroll.SmallPos := LMScroll.Pos
else LMScroll.SmallPos := High(LMScroll.SmallPos);
if Assigned(lWinControl) and (lWinControl is TCustomListbox) and (LMsg = LM_VSCROLL) then
begin
// WM_VSCROLL message carries only 16 bits of scroll box position data.
// This workaround is needed, to scroll higher than a position value of 65536.
WinProcess := False;
TCustomListBox(lWinControl).TopIndex := LMScroll.Pos;
end;
end;
// FlashWindowEx is not (yet) in FPC