Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Cutoms page backgound color error (http://forums.winamp.com/showthread.php?t=223081)

Satsuki 1st August 2005 14:24

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:

PHP Code:

...
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:
PHP Code:

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.

++

JasonFriday13 2nd August 2005 03:21

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

Satsuki 2nd August 2005 04:39

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 :
PHP Code:

GetDlgItem $R0 $HWND xxxx
   SetCtlColors $R0 00C000 000000 


Give me a full backgroud color:
PHP Code:

FindWindow $R0 "#32770" "" $HWNDPARENT
SetCtlColors $R0 FFFFFF 000000 


for the global background and for the others controls:
PHP Code:

GetDlgItem $R0 $HWND xxxx
   SetCtlColors $R0 00C000 000000 

[edit: edited the full windows background, add a c/p arror]

++

JasonFriday13 2nd August 2005 04:48

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.

deguix 2nd August 2005 09:05

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.

Satsuki 2nd August 2005 14:01

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

thank for your answer anyway.

++

Satsuki 2nd August 2005 15:10

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.

++


All times are GMT. The time now is 18:03.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.