win32: move wm_enable groupbox handling to groupbox message handler

git-svn-id: trunk@25053 -
This commit is contained in:
paul 2010-04-29 01:46:04 +00:00
parent 8ef1c9a937
commit 6e25284b27
2 changed files with 9 additions and 4 deletions

View File

@ -1474,10 +1474,6 @@ begin
if not ThemeServices.ThemesEnabled
and (lWinControl is TCustomBitBtn)
then DrawBitBtnImage(TCustomBitBtn(lWinControl), TCustomBitBtn(lWinControl).Caption);
// if it is groupbox and themed app then invalidate it on enable change
// to redraw graphic controls on it (issue 0007877)
if ThemeServices.ThemesAvailable and (lWinControl is TCustomGroupBox) then
lWinControl.Invalidate;
end;
WM_ERASEBKGND:
begin

View File

@ -465,6 +465,15 @@ begin
Result := HTCLIENT;
Exit;
end;
WM_ENABLE:
begin
Result := WindowProc(Window, Msg, WParam, LParam);
// if it is groupbox and themed app then invalidate it on enable change
// to redraw graphic controls on it (issue 0007877)
if ThemeServices.ThemesAvailable then
InvalidateRect(Window, nil, True);
Exit;
end;
end;
Result := WindowProc(Window, Msg, WParam, LParam);
end;