LCL: Fix wrong ListBox painting in WinXP. Issue #28275, patch from wp.

git-svn-id: trunk@49321 -
This commit is contained in:
juha 2015-06-12 21:42:11 +00:00
parent c462c54354
commit 95725008c2

View File

@ -613,8 +613,11 @@ begin
Exit(DeliverMessage(WindowInfo^.WinControl, LMessage));
end;
WM_ERASEBKGND:
// Avoid unnecessary background paints to avoid flickering of the listbox
if WindowsVersion <= wvXP then // Standardbehavior for XP
Result := CallDefaultWindowProc(Window, Msg, WParam, LParam)
else
begin
// Avoid unnecessary background paints to avoid flickering of the listbox
WindowInfo := GetWin32WindowInfo(Window);
Count := SendMessage(Window, LB_GETCOUNT, 0, 0);
if Assigned(WindowInfo^.WinControl) and