win32: remove groupbox wm_erasebackground workaround - this reduces flicking

git-svn-id: trunk@24942 -
This commit is contained in:
paul 2010-04-26 01:55:11 +00:00
parent 2588baa18d
commit e4743af864
2 changed files with 4 additions and 13 deletions

View File

@ -1525,18 +1525,9 @@ begin
end;
if not GetNeedParentPaint(WindowInfo, lWinControl) or (eraseBkgndCommand = ecDoubleBufferNoRemove) then
begin
if ThemeServices.ThemesEnabled and WindowInfo^.isGroupBox and (lWinControl <> nil) then
begin
// Groupbox (which is a button) doesn't erase it's background properly; force repaint
lWinControl.EraseBackground(HDC(WParam));
LMessage.Result := 1;
end
else
begin
LMessage.Msg := LM_ERASEBKGND;
LMessage.WParam := WParam;
LMessage.LParam := LParam;
end;
LMessage.Msg := LM_ERASEBKGND;
LMessage.WParam := WParam;
LMessage.LParam := LParam;
end else
begin
if not ThemeServices.ThemesEnabled then

View File

@ -56,7 +56,7 @@ type
TWin32WSCustomGroupBox = class(TWSCustomGroupBox)
published
class function CreateHandle(const AWinControl: TWinControl;
class function CreateHandle(const AWinControl: TWinControl;
const AParams: TCreateParams): HWND; override;
class procedure AdaptBounds(const AWinControl: TWinControl;
var Left, Top, Width, Height: integer; var SuppressMove: boolean); override;