Archive: installoptions: can't change color of label


installoptions: can't change color of label
Hi,

i can't find out, why GetDlgItem always returns 0 in this case (i got the checkbox and a link on the finishpage and i want to add another label[field6]). FindWindow works (return <> 0):

!define MUI_PAGE_CUSTOMFUNCTION_PRE "SetCheckbox"

...

Function SetCheckbox
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "NumFields" "6"

!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 6" "Bottom" "170"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 6" "Top" "150"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 6" "Left" "120"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 6" "Right" "400"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 6" "Type" "Label"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 6" "Text" "TEST"

FindWindow $2 "#32770" "" $HWNDPARENT
MESSAGEBOX MB_OK $2
GetDlgItem $2 $2 1205 ;1200+fieldnumber-1 ?
MESSAGEBOX MB_OK $2
SetCtlColors $2 000000 FFFFFF

...

I can see the label with the text "TEST", but i can't change it's backgroundcolor to white. Help!
:)


The colour can only be changed in the Show function, not the Pre function.

-Stu


Also, you should use the $MUI_HWND variable for the inner dialog rather than use FindWindow.

-Stu


Thank you, again. Didn't know $MUI_HWND. Now it's alright.