CColor() [v1.0]

作者: nick, majkinetor 最近更新时间: nonexistent


Set text and background color for some Gui controls. Supported types: Edit, Text, ListBox, ComboBox, DropDownList, CheckBox, RadioButton, ListView, TreeView, RichEdit

CColor(Hwnd, Background="", Foreground="")
CColor_(Wp, Lp, Msg, Hwnd)

关于函数的参数和返回值, 请参阅其源码.

备注

This module is part of the Forms Framework package.

Original code by nick / denick, See:
* http://www.autohotkey.com/forum/topic39055.html

Later majkinetor reworked on this.

关于此函数(集)的更新细节和注意事项, 请参见 AutoHotkey 论坛: http://www.autohotkey.com/forum/viewtopic.php?t=53317

许可

此函数(集)是基于 BSD 许可的开源项目. 想了解许可详情, 请参见 http://creativecommons.org/licenses/BSD/

示例

; #Include CColor.ahk
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%

Gui, Add, Text, HwndH1 cred, hello
Gui, Add, Text, HwndH2 cred x+8, (de)nick
Gui, Add, Text, HwndH3 cred x+8, thx

MsgBox Proceed further to see what happens if colored with CColor
Gui, Show, h100 w200
Sleep, 1500
CColor(h2, "FFFFFF", "blue")
Gui, 1:+LastFound
WinSet, ReDraw ; Without this redraw, the change does not take effect!
Return

GuiClose:
ExitApp