Old 13th March 2007, 14:09   #1
gerome69
Junior Member
 
Join Date: Sep 2006
Posts: 16
MUI_PAGE_INSTFILES: change bgcolor

Hi together!
Is it possible to change the background color of the page
MUI_PAGE_INSTFILES

If yes: how?

Thanks for Tips, Bernd
gerome69 is offline   Reply With Quote
Old 13th March 2007, 15:51   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
If you want to change the bkg color, this wiki page might help start,

http://nsis.sourceforge.net/Demonstr...Pre_Show_Leave

if you want to change the progress bar then you'll find the answer in MUI documentation

http://nsis.sourceforge.net/Docs/Mod...UI/Readme.html

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 13th March 2007, 15:58   #3
gerome69
Junior Member
 
Join Date: Sep 2006
Posts: 16
Quote:
If you want to change the bkg color, this wiki page might help start,
http://nsis.sourceforge.net/Demonstr...Pre_Show_Leave
But they do nothing else than:
!insertmacro MUI_PAGE_INSTFILES

And for other pages some things with FindWindow and SetCtlColors.
I managed this for my custom pages in the same way, but my problem is that I don't have any ideas "to get a foot in the door", while the page MUI_PAGE_INSTFILES is displayed. There is nothing like an eventhandler etc.

Surely I had a look at this page and did not find anything.

Greetings, Bernd
gerome69 is offline   Reply With Quote
Old 13th March 2007, 16:02   #4
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
copied from MUI documentation

Installation Page Interface Settings

MUI_INSTFILESPAGE_COLORS (/windows | (foreground color: RRGGBB hexadecimal) (background color: RRGGBB hexadecimal))
The colors of the details screen. Use /windows for the default Windows colors.
Default: /windows

MUI_INSTFILESPAGE_PROGRESSBAR ("" | colored | smooth)
The style of the progress bar. Colored makes it use the MUI_INSTALLCOLORS.
Default: smooth

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 13th March 2007, 16:05   #5
Davion
Senior Member
 
Join Date: Apr 2004
Location: Nuremberg, Germany
Posts: 130
Send a message via Yahoo to Davion
You're too fast Red Wine,
I've just copied the same block

it's always good to refresh before submitting
Davion is offline   Reply With Quote
Old 13th March 2007, 16:15   #6
gerome69
Junior Member
 
Join Date: Sep 2006
Posts: 16
Quote:
Originally posted by Red Wine
MUI_INSTFILESPAGE_COLORS (/windows | (foreground color: RRGGBB hexadecimal) (background color: RRGGBB hexadecimal))
The colors of the details screen. Use /windows for the default Windows colors.
Default: /windows
Sorry for not reading this.
I tried it (maybe the wrong way) and it has no effect. My whole installer background is white, but while the progressbar for the file copying is show, the background remains in the standard windows color gray :-(

Relevant passage from my code:
code:

!include "MUI.nsh"
!define MUI_BGCOLOR FFFFFF
!define MUI_ABORTWARNING
!define MUI_ICON ".\icon.ico"
!define MUI_UNICON ".\icon.ico"
!define MUI_WELCOMEFINISHPAGE_BITMAP ".\side.bmp"
!define MUI_WELCOMEPAGE_TITLE_3LINES
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP ".\header.bmp"
!define MUI_HEADERIMAGE_UNBITMAP ".\header.bmp"
!define MUI_INSTFILESPAGE_COLORS "FFFFFF 00000"
!insertmacro MUI_PAGE_WELCOME
Page custom ShowSQLServerConfigDialog WriteToIni
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_TITLE_3LINES
!define MUI_FINISHPAGE
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_INSTFILES

!insertmacro MUI_LANGUAGE "German"



What might be wrong?

Thanks for further help, Bernd
gerome69 is offline   Reply With Quote
Old 13th March 2007, 16:23   #7
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
post a snapshot (png) if possible showing what you want to change.

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 13th March 2007, 16:27   #8
gerome69
Junior Member
 
Join Date: Sep 2006
Posts: 16
Quote:
Originally posted by Red Wine
post a snapshot (png) if possible showing what you want to change.
I did. My installer should have a complete white background. But the inner window stills remains gray. How do I get a HWD to this part of the gui to change the color to white?

Greetings, Bernd
Attached Images
File Type: png screenshot.png (20.7 KB, 391 views)
gerome69 is offline   Reply With Quote
Old 13th March 2007, 16:55   #9
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
code:
!define MUI_INSTFILESPAGE_PROGRESSBAR "colored"
!define MUI_INSTFILESPAGE_COLORS "0xFFFFFF 0xFFFFFF"
......
......
!define MUI_PAGE_CUSTOMFUNCTION_SHOW inst_show
!insertmacro MUI_PAGE_INSTFILES
.......
.......

function inst_show
FindWindow $1 "#32770" "" $HWNDPARENT
SetCtlColors $1 '' '0xFFFFFF'
functionend


Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 13th March 2007, 17:15   #10
gerome69
Junior Member
 
Join Date: Sep 2006
Posts: 16
Quote:
Originally posted by Red Wine
code:
!define MUI_INSTFILESPAGE_PROGRESSBAR "colored"
!define MUI_INSTFILESPAGE_COLORS "0xFFFFFF 0xFFFFFF"
......
......
!define MUI_PAGE_CUSTOMFUNCTION_SHOW inst_show
!insertmacro MUI_PAGE_INSTFILES
.......
.......

function inst_show
FindWindow $1 "#32770" "" $HWNDPARENT
SetCtlColors $1 '' '0xFFFFFF'
functionend

Thanks, this works fine.
The only thing which is not 100% perfect: The background color of the progressbar remains gray.
How do I get a handle to this to change it's bgcolor to white, too?

B.
gerome69 is offline   Reply With Quote
Old 13th March 2007, 17:25   #11
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
"colored" makes it white for me (no XP theme-classic windows)

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 13th March 2007, 17:56   #12
gerome69
Junior Member
 
Join Date: Sep 2006
Posts: 16
Quote:
Originally posted by Red Wine
"colored" makes it white for me (no XP theme-classic windows)
But I want to use it also with XP style.

What I found out now from:
Contrib\UIs\UI Holder\resource.h and resource.rc

The element I'm looking for is not the progress bar. It is the label. And I want to change the bgcolor of this label.

CONTROL "",IDC_INTROTEXT,"Static",...
#define IDC_INTROTEXT 1006

So what I did now:
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $1 $0 1006

This gives me definetly an handle for the label. :-)

Then I tried:
SetCtlColors $1 0xffffff bgcolor
=> White letters on black background, exactly the opposite of what I wanted :-(

SetCtlColors $1 0x000000 bgcolor
=> Black letters on black background, nothing to see.

SetCtlColors $1 0xffffff transparent
=> White letters on black background, exactly the opposite of what I wanted :-(

SetCtlColors $2 0xffffff transparent
=> White letters on white bgground => nothing to see.

SetCtlColors $2 0xffffff transparent
=> Black letters on white ground => perfect.
No, not at all. All text are written on the label without erasing the old text. So a more or less black bar on white background appears.

Any other ideas?

B.

transparent
gerome69 is offline   Reply With Quote
Old 13th March 2007, 18:00   #13
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
SetCtlColors $1 "0x000000" "0xFFFFFF"

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 13th March 2007, 18:08   #14
gerome69
Junior Member
 
Join Date: Sep 2006
Posts: 16
Quote:
Originally posted by Red Wine
SetCtlColors $1 "0x000000" "0xFFFFFF"
Huuuh, yes that's it! Thanks for your assistence and patience.

I'm not familiar with this WINApi function, I normally use QT framework for windows stuff.

Greetings, Bernd
gerome69 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