函数参考


_WinAPI_SetSysColors

获取系统显示设备的信息

#Include <WinAPI.au3>
_WinAPI_SetSysColors($vElements, $vColors)

参数

$vElements 单元素或数组元素
$vColors 单颜色或颜色数组

返回值

成功: 返回 True
失败: 返回 False

注意/说明

 见 _WinAPI_GetSysColor 的元素索引和需求清单.

相关

_WinAPI_GetSysColor

详情参考

在MSDN中搜索


示例/演示


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

_Main()

Func _Main()
    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()

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop

        EndSwitch
    WEnd

    GUIDelete()

    _WinAPI_SetSysColors($aElements, $aSaveColors)

    Exit

EndFunc   ;==>_Main