win32: fix window scrollbar drawing under xp - sometimes they look unthemed (#0011872)

git-svn-id: trunk@17363 -
This commit is contained in:
paul 2008-11-13 02:12:18 +00:00
parent 2965833d06
commit 7cf7828c20

View File

@ -3109,6 +3109,12 @@ function TWin32WidgetSet.ShowScrollBar(Handle: HWND; WBar: Integer; BShow: Boole
begin
Assert(False, 'Trace:[TWin32WidgetSet.ShowScrollBar]');
Result := Boolean(Windows.ShowScrollBar(Handle, WBar, BShow));
if BShow and Result and ThemeServices.ThemesEnabled then
begin
// sometimes on xp scrollbars does not invalidate themself and look as they are unthemed
// force window frame (scrollbars are not in the client area) to redraw
Windows.RedrawWindow(Handle, nil, 0, RDW_INVALIDATE or RDW_FRAME or RDW_NOCHILDREN);
end;
end;
{------------------------------------------------------------------------------