diff --git a/lcl/interfaces/win32/win32callback.inc b/lcl/interfaces/win32/win32callback.inc index 2045fc0e85..d5e95f538d 100644 --- a/lcl/interfaces/win32/win32callback.inc +++ b/lcl/interfaces/win32/win32callback.inc @@ -1834,12 +1834,6 @@ begin begin LMessage.Result := HTTRANSPARENT; WinProcess := false; - end - else - if (lWinControl is TCustomGroupBox) then - begin - LMessage.Result := HTCLIENT; - WinProcess := false; end; end; end; @@ -2118,7 +2112,7 @@ begin end; // cross-interface compatible: complete invalidate on resize if (PWindowPos(LParam)^.flags and SWP_NOSIZE) = 0 then - Windows.InvalidateRect(Window, nil, true); + Windows.InvalidateRect(Window, nil, True); end; WM_MEASUREITEM: begin @@ -2163,6 +2157,11 @@ begin ThemeServices.IntfDoOnThemeChange; end; end; + WM_UPDATEUISTATE: + begin + if ThemeServices.ThemesEnabled then + InvalidateRect(Window, nil, True); + end; { >= WM_USER } diff --git a/lcl/interfaces/win32/win32wscontrols.pp b/lcl/interfaces/win32/win32wscontrols.pp index 0c0c77411a..6d25b92a76 100644 --- a/lcl/interfaces/win32/win32wscontrols.pp +++ b/lcl/interfaces/win32/win32wscontrols.pp @@ -627,7 +627,7 @@ end; class procedure TWin32WSWinControl.Invalidate(const AWinControl: TWinControl); begin // lpRect = nil updates entire client area of window - InvalidateRect(AWinControl.Handle, nil, true); + InvalidateRect(AWinControl.Handle, nil, True); end; class procedure TWin32WSWinControl.PaintTo(const AWinControl: TWinControl; diff --git a/lcl/interfaces/win32/win32wsstdctrls.pp b/lcl/interfaces/win32/win32wsstdctrls.pp index ee83b468a8..a192413d0b 100644 --- a/lcl/interfaces/win32/win32wsstdctrls.pp +++ b/lcl/interfaces/win32/win32wsstdctrls.pp @@ -459,20 +459,14 @@ end; function GroupBoxWindowProc(Window: HWnd; Msg: UInt; WParam: Windows.WParam; LParam: Windows.LParam): LResult; stdcall; -var - WindowInfo: PWin32WindowInfo; begin // move groupbox specific code here case Msg of - WM_UPDATEUISTATE: - begin - if ThemeServices.ThemesEnabled then + WM_NCHITTEST: begin - WindowInfo := GetWin32WindowInfo(Window); - if (WindowInfo <> nil) and (WindowInfo^.WinControl <> nil) then - WindowInfo^.WinControl.Invalidate; + Result := HTCLIENT; + Exit; end; - end; end; Result := WindowProc(Window, Msg, WParam, LParam); end;