diff --git a/lcl/interfaces/win32/win32wscontrols.pp b/lcl/interfaces/win32/win32wscontrols.pp index eff8bf0732..5219a0b925 100644 --- a/lcl/interfaces/win32/win32wscontrols.pp +++ b/lcl/interfaces/win32/win32wscontrols.pp @@ -206,6 +206,12 @@ begin end; end; + // mantis #26206: Layered windows are only supported for top-level windows. + // After Windows 8 it is supported for child windows too. + if (WindowsVersion < wv8) and Assigned(AWinControl.Parent) + and (AWinControl is TCustomForm) and TCustomForm(AWinControl).AlphaBlend then + FlagsEx := FlagsEx and not WS_EX_LAYERED; + Window := CreateWindowExW(FlagsEx, PWideChar(WideString(pClassName)), PWideChar(UTF8ToUTF16(WindowTitle)), Flags, Left, Top, Width, Height, Parent, 0, HInstance, @NCCreateParams);