Skip to content
⌘ NSIS Forum Archive

Help with the usage of "SetCtlColors"

7 posts

Joel#

Help with the usage of "SetCtlColors"

Can someone point me about how to use the SetCtlColors for text and background colors?
I read the doc, but still with 🧟
Joost Verburg#
Syntax:

SetCtlColors HWND TEXTCOLOR BGCOLOR

Use hexadecimal colors like HTML (without the #).
Joel#edited
Well I got this:

!define BGcolor "587CB8" ;Color del TOP para BG
!define FGcolor "9C9C9C" ;Color de las letras (FONT)
;...
!define MUI_PAGE_CUSTOMFUNCTION_PRE "DirColor"
!insertmacro MUI_PAGE_DIRECTORY
;...
Function "DirColor"
GetDlgItem $0 $HWNDPARENT 1019
SetCtlColors $0 ${FGcolor} ${BGcolor}
FunctionEnd
And nothing... still the default 🙁

/edit
Does anyone already try SetCtlColors?
Joel#
Done that... but no.
That's only the part that left to paint. I wanna paint the field
wich contains the installation path.
kichik#
$HWNDPARENT is not the parent of 1019. Use:

FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $0 1019
SetCtlColors $0 FF0000 00FF00