Merged revision(s) 49321 #95725008c2, 49561 #c6a1a07dac from trunk:

LCL: Fix wrong ListBox painting in WinXP. Issue #28275. 
........
LCL-Win32: Take care of standard style painting when reducing flicker in TListbox. Issue #28146, patch from wp.
........

git-svn-id: branches/fixes_1_4@49564 -
This commit is contained in:
maxim 2015-07-24 21:54:29 +00:00
parent f189317ad2
commit 1cd1576a00

View File

@ -613,8 +613,12 @@ begin
Exit(DeliverMessage(WindowInfo^.WinControl, LMessage));
end;
WM_ERASEBKGND:
// Avoid unnecessary background paints to avoid flickering of the listbox
if (WindowsVersion <= wvXP) or not ThemeServices.ThemesEnabled then
// Standardbehavior for XP, or no themes
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