UE_morf_boon Posted January 18, 2021 Share Posted January 18, 2021 (edited) Hey. I'm trying to add blur to a rounded window. I'm using blur from this topic: But it doesn't work with rounded corners. I think the problem is that the user32.dll library is called twice. Code: expandcollapse popup#Include <GUIConstantsEx.au3> #Include <WindowsConstants.au3> #Include <WinAPI.au3> #include "_WinAPI_DwmEnableBlurBehindWindow10.au3" $hForm2 = GUICreate("MyGUI", 300, 370, -1, -1, $WS_POPUP) ;_WinAPI_DwmEnableBlurBehindWindow10($hForm2) GUISetBkColor(0x000000) GUICtrlSetBkColor(-1, 0x000000) _Corners($hForm2,0,0,300,370,30,30) GUICtrlCreateLabel('',0,0,400, 25,-1,$GUI_WS_EX_PARENTDRAG) $close = GUICtrlCreateButton("exit",20,40,80,25) GUIRegisterMsg($WM_MOVE, 'WM_MOVE') GUISetState(@SW_SHOW, $hForm2) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $close Exit EndSelect WEnd Exit Func _Corners($hWnd,$x1,$y1,$x2,$y2,$x3,$y3) $pos = WinGetPos($hWnd) $ret = DllCall("gdi32.dll", "long", "CreateRoundRectRgn", "long", $x1, "long", $y1, "long", $x2, "long", $y2, "long",$x3, "long", $y3) If $ret[0] Then $ret2 = DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $hWnd, "long", $ret[0], "int", 1) If $ret2[0] Then Return 1 Else Return 0 EndIf EndIf EndFunc Func WM_MOVE($hWnd, $iMsg, $wParam, $lParam) Switch $hWnd Case $hForm2 Local $Pos = WinGetPos($hForm2) EndSwitch Return $GUI_RUNDEFMSG EndFunc Please help me combine these two solutions or find an analogue. Edited January 18, 2021 by UE_morf_boon Link to comment Share on other sites More sharing options...
UE_morf_boon Posted January 21, 2021 Author Share Posted January 21, 2021 Bump. I found this page "social.msdn.microsoft.com", but I don't know how to apply that to a solution. Can anyone help? Link to comment Share on other sites More sharing options...
DeanJGrey Posted January 26, 2021 Share Posted January 26, 2021 Also trying to figure this out. Can't get the 'DWMAPI' to apply a blur effect on Windows 10, and on the other hand, 'SetWindowCompositionAttribute' won't allow shapes or regions. Can't wait to figure it out. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now