﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
4078	Upgrading _WinAPI_DwmGetWindowAttribute	TommyDDR		"I recently needed to retrieve window border and color but values are not admitted in _WinAPI_DwmGetWindowAttribute, even if msdn say ""Use with DwmSetWindowAttribute"" for DWMWA_WINDOW_CORNER_PREFERENCE, it also can be readed with get so i added it.
(i tried with DWMWA_BORDER_COLOR without success)
I saw _WinAPI_DwmSetWindowAttribute was updated in 3.3.18.0, so i put this feature request

There is the new function :

{{{#!autoit lineno=1
Func _WinAPI_DwmGetWindowAttribute($hWnd, $iAttribute)
	Local $tagStruct
	Switch $iAttribute
		Case 33
			$tagStruct = 'dword'
		Case 5, 9
			$tagStruct = $tagRECT
		Case 1, 14
			$tagStruct = 'uint'
		Case Else
			Return SetError(1, 0, 0)
	EndSwitch

	Local $tData = DllStructCreate($tagStruct)
	Local $aCall = DllCall('dwmapi.dll', 'long', 'DwmGetWindowAttribute', 'hwnd', $hWnd, 'dword', $iAttribute, _
			'struct*', $tData, 'dword', DllStructGetSize($tData))
	If @error Then Return SetError(@error + 10, @extended, 0)
	If $aCall[0] Then Return SetError(10, $aCall[0], 0)

	Switch $iAttribute
		Case 1, 14, 33
			Return DllStructGetData($tData, 1)
		Case Else
			Return $tData
	EndSwitch
EndFunc   ;==>_WinAPI_DwmGetWindowAttribute
}}}



I attached an exemple
"	Feature Request	closed		Standard UDFs		None	Fixed		
