Archive: Cutoms page backgound color error


Cutoms page backgound color error
  Hello,

i've donne an installer witch is all black with white text and some control.
i also use a lot of custom section.

but i have a strange bug, when a am on a non custom page (mui page) and go back to previews page, the backgound ins't black anymore, it revert back to the nsis default color.
same bug when a have a custom page right after a mui page, the background is nsis default color and not blakc.
i'm not sure to be well understand (my crap english) so here's and exemple:

...

>Page custom CustomPagesimple
Page custom simpleinstallselect
>!define MUI_PAGE_CUSTOMFUNCTION_SHOW "CompShowProc"
>!insertmacro MUI_PAGE_COMPONENTS
Page custom CustomPageavance1
Page custom CustomPageavance2
>...
the first time "CustomPagesimple" is displayed it's all black with white text.
if i go to "CustomPagesimple" from "simpleinstallselect" (MUI button) there's no bug.
if i go to "simpleinstallselect" from MUI_PAGE_COMPONENTS the back is nsis default color and not black.
if i go to "CustomPageavance1" from MUI_PAGE_COMPONENTS the back is nsis default color and not black.
if i go to CustomPageavance2 from CustomPageavance1 it's all black with white text (no bug again).

in all those section i use the following command to make the background black:

FindWindow $R0 "#32770" "" $HWNDPARENT

SetCtlColors $R0 FFFFFF 000000
>
if someone as any idea to make the backuground black on all page in one command, or where is the bug, thanks.

++

Use Bg_color for the background. It's in the help file. The default is 'Bg_color "/windows"'.


i already use "!define MUI_BGCOLOR 0xFF000000".
put it in a custom section return me an error.
ut "!define BGCOLOR 0xFF000000" in a custom section doesn't works.

doesn't works for background :


GetDlgItem $R0 $HWND xxxx

SetCtlColors $R0 00C000 000000
>

Give me a full backgroud color:

FindWindow $R0 "#32770" "" $HWNDPARENT

SetCtlColors $R0 FFFFFF 000000
>

for the global background and for the others controls:

GetDlgItem $R0 $HWND xxxx

SetCtlColors $R0 00C000 000000
>
[edit: edited the full windows background, add a c/p arror]

++

Your not supposed to put '!define bgcolor' in a function (or section for that matter). I will have to test it tonight and get back tomorrow morning.


You and the docs are wrong. A color, for this instruction, is an hexadecimal number (starting with "0x") with the format 0xRRBBGG.

The docs show wrong examples that don't use hexadecimal numbers: All examples except for the "SetCtlColors" instruction itself.


FFFFFF , 0xFFFFFF and 0xFFFFFFFF gave me exactly the same results.

thank for your answer anyway.

++


Found de way to avoid the problem.
i juste add a black bmp as last field for all my custom page ^^.

it's work like a charm.

thanks for all your answers.

++