Old 1st August 2005, 14:24   #1
Satsuki
Junior Member
 
Join Date: Jul 2004
Posts: 30
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.

++
Satsuki is offline   Reply With Quote
Old 2nd August 2005, 03:21   #2
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 916
Use Bg_color for the background. It's in the help file. The default is 'Bg_color "/windows"'.
JasonFriday13 is offline   Reply With Quote
Old 2nd August 2005, 04:39   #3
Satsuki
Junior Member
 
Join Date: Jul 2004
Posts: 30
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]

++

Last edited by Satsuki; 2nd August 2005 at 05:19.
Satsuki is offline   Reply With Quote
Old 2nd August 2005, 04:48   #4
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 916
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.
JasonFriday13 is offline   Reply With Quote
Old 2nd August 2005, 09:05   #5
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
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.

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 2nd August 2005, 14:01   #6
Satsuki
Junior Member
 
Join Date: Jul 2004
Posts: 30
FFFFFF , 0xFFFFFF and 0xFFFFFFFF gave me exactly the same results.

thank for your answer anyway.

++
Satsuki is offline   Reply With Quote
Old 2nd August 2005, 15:10   #7
Satsuki
Junior Member
 
Join Date: Jul 2004
Posts: 30
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.

++
Satsuki is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump