From 96834c85ee543dfe8fa49fd3d4659b87514a9a77 Mon Sep 17 00:00:00 2001 From: ondrej Date: Thu, 24 Nov 2016 15:47:57 +0000 Subject: [PATCH] win32: fix showing an alphablend parented form on win 7 and older. issue #26206, patch from Michl git-svn-id: trunk@53436 - --- lcl/interfaces/win32/win32wscontrols.pp | 6 ++++++ 1 file changed, 6 insertions(+) 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);