﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
3993	_WinAPI_SetWindowTheme() - remove limits	argumentum		"Trying to change a color on a checkbox control I needed to remove the theme and found the limitation on the implementation of the wrapper.
The request is to remove the ""string or null, only"" from the func., as zero is the value that is needed in this case.

{{{
#include <WinAPITheme.au3>
Test()
Func Test()
	GUICreate(@ScriptName)

	GUICtrlCreateCheckbox(""one"", 10, 10, 200)

	GUICtrlCreateCheckbox(""two"", 10, 30, 200)
	GUICtrlSetColor(-1, 0xFF00FF)

	GUICtrlCreateCheckbox(""three"", 10, 50, 200)
	_WinAPI_SetWindowTheme(GUICtrlGetHandle(-1)) ;, 0, 0)
	GUICtrlSetColor(-1, 0xFF00FF)

	GUICtrlCreateCheckbox(""Four"", 10, 70, 200)
	_WinAPI_SetWindowTheme_mod(GUICtrlGetHandle(-1)) ;, 0, 0)
	GUICtrlSetColor(-1, 0xFF00FF)

	GUISetState()
	While GUIGetMsg() <> -3
	WEnd
	GUIDelete()
EndFunc

Func _WinAPI_SetWindowTheme_mod($hWnd, $sName = Default, $sList = Default) ; #include <WinAPITheme.au3>
;~ 	If Not IsString($sName) Then $sName = Null ; <-- this limits what can get done with it.
;~ 	If Not IsString($sList) Then $sList = Null ; also, don't ask me why ""Default"" works !, I was going to use 0

	Local $sResult = DllCall('UxTheme.dll', 'long', 'SetWindowTheme', 'hwnd', $hWnd, 'wstr', $sName, 'wstr', $sList)
	If @error Then Return SetError(@error, @extended, 0)
	If $sResult[0] Then Return SetError(10, $sResult[0], 0)
	Return 1
EndFunc   ;==>_WinAPI_SetWindowTheme
}}}
"	Bug	closed		Standard UDFs	3.3.16.1	None	No Bug	SetWindowTheme	
