Archive: MUI_PAGE_INSTFILES: change bgcolor


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


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


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.

http://nsis.sourceforge.net/Docs/Mod...UI/Readme.html
Surely I had a look at this page and did not find anything.

Greetings, Bernd

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


You're too fast Red Wine,
I've just copied the same block :D

it's always good to refresh before submitting


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:

!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

post a snapshot (png) if possible showing what you want to change.


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

!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

Originally posted by Red Wine
!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.

"colored" makes it white for me (no XP theme-classic windows)


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

SetCtlColors $1 "0x000000" "0xFFFFFF" ;)


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