Function Reference


_WinAPI_SetSysColors

Obtains information about the display devices in a system

#include <WinAPISysWin.au3>
_WinAPI_SetSysColors ( $vElements, $vColors )

Parameters

$vElements Single element or Array of elements
$vColors Single Color or Array of colors

Return Value

Success: True
Failure: False, call _WinAPI_GetLastError() to get extended error information

Remarks

See _WinAPI_GetSysColor() for list of Element indexes and requirements.

Related

_WinAPI_GetSysColor

See Also

Search SetSysColors in MSDN Library.

Example

#include <GUIConstantsEx.au3>
#include <WinAPISysWin.au3>
#include <WindowsConstants.au3>

Example()

Func Example()
        Local $aElements[2] = [$COLOR_ACTIVECAPTION, $COLOR_GRADIENTACTIVECAPTION]
        ; Red and Yellow
        Local $aColors[2] = [255, 65535], $aSaveColors[2]

        GUICreate("My GUI", 300, 200)

        $aSaveColors[0] = _WinAPI_GetSysColor($COLOR_ACTIVECAPTION)
        $aSaveColors[1] = _WinAPI_GetSysColor($COLOR_GRADIENTACTIVECAPTION)

        _WinAPI_SetSysColors($aElements, $aColors)

        GUISetState(@SW_SHOW)

        While 1
                Switch GUIGetMsg()
                        Case $GUI_EVENT_CLOSE
                                ExitLoop

                EndSwitch
        WEnd

        GUIDelete()

        _WinAPI_SetSysColors($aElements, $aSaveColors)

        Exit
EndFunc   ;==>Example