From 0aae34867ad06741a9b5972898c8d5ac8129a8f1 Mon Sep 17 00:00:00 2001 From: "Robert C. Maehl" Date: Wed, 8 Nov 2023 15:50:10 -0500 Subject: [PATCH] Add Rounded Corner Support --- Includes/_Theming.au3 | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Includes/_Theming.au3 b/Includes/_Theming.au3 index 066ac2b..05ab1e8 100644 --- a/Includes/_Theming.au3 +++ b/Includes/_Theming.au3 @@ -145,4 +145,20 @@ Func _SetBkSelfIcon($ControlID, $iForeground, $iBackground, $sIcon, $iIndex, $iW _WinAPI_DeleteObject($hBkIcon) _GDIPlus_ImageDispose($hImage) Return SetError(0, 0, 1) -EndFunc ;==>_SetBkSelfIcon \ No newline at end of file +EndFunc ;==>_SetBkSelfIcon + +Func _WinAPI_DwmSetWindowAttributeExt($hWnd, $iAttribute, $iData) + Switch $iAttribute + Case 2, 3, 4, 6, 7, 8, 10, 11, 12, 33 + + Case Else + Return SetError(1, 0, 0) + EndSwitch + + Local $aCall = DllCall('dwmapi.dll', 'long', 'DwmSetWindowAttribute', 'hwnd', $hWnd, 'dword', $iAttribute, _ + 'dword*', $iData, 'dword', 4) + If @error Then Return SetError(@error, @extended, 0) + If $aCall[0] Then Return SetError(10, $aCall[0], 0) + + Return 1 +EndFunc ;==>_WinAPI_DwmSetWindowAttributeExt \ No newline at end of file