Archive: Using SetBkColor to paint the Installer's dialogs


Using SetBkColor to paint the Installer's dialogs
Ok!
Let's try it...
I'm painting all the dialogs...
-Welcome Page. Done :D
-My first custome page I use a groupbox, I paint the dialog ID,
but can't paint the inside, anyone know how?
Thanks


I just found that there's a block in each
dialog in the center.
Anyone know that ID, I can't paint that portion... :hang:


The HWND for this window is returned by InstallOptions. You need to pop it right after MUI_INSTALLOPTIONS_INITDIALOG.

As for the branding text, I have a new idea. The only problem is it will change the color of the license box too... It's the SetSysColors function, you need to call it with System.dll. I don't have the time right now to write the specific code so you'll have to try it on your own.


Thanks kichik :)
But this thread actually helps... wow... :D


kichik is it possible to color the message boxes for eg. "Are you sure you want to quit setup" ? If so how ?
Lobo Lunar how did you color the next, cancel buttons ?


Need to send a Message for that..
I don't know wich is.... :(

Does anyone try to paint a custom page dialog...continue with
the pages, then return to that page? The dialog colors return to the
default ones...


Fixed that :up:
Thanks anyway!

[edit]
This is my code:


!define MUI_CUSTOMFUNCTION_INSTFILES_SHOW "LogFont"
!define MUI_UNCUSTOMFUNCTION_INSTFILES_SHOW "un.LogFont"

Function "LogFont"
FindWindow $3 "#32770" "" $HWNDPARENT
GetDlgItem $3 $3 1016
CreateFont $4 "Comic Sans Ms" "8" "500"
SendMessage $3 ${WM_SETFONT} $4 0
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $1 $0 1006
SetBkColor $0 0x00E3E3E3
SetBkColor $1 0x00E3E3E3
FunctionEnd

Function "un.LogFont"
FindWindow $3 "#32770" "" $HWNDPARENT
GetDlgItem $3 $3 1016
CreateFont $4 "Times New Roman" "8" "500"
SendMessage $3 ${WM_SETFONT} $4 0
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $1 $0 1006
SetBkColor $0 0x00E3E3E3
SetBkColor $1 0x00E3E3E3
FunctionEnd

All it's great but it doesn't paint the hole dialog in the
Uninstaller dialog "Uninstall files"...
What's wrong?
[/edit]

You can't change the color of the message boxes without SetSysColors afaik. The only problem is that SetSysyColors sets the colors for every window.

As for the uninstall window, it's the same code as in the other thread, without any GetDlgItem.


Hi KichiK!
Almost done. See the attach file... working great...but there are
some areas left... I use this code, and it works:


!define MUI_UNCUSTOMFUNCTION_INSTFILES_PRE "un.LogFont1"
!define MUI_UNCUSTOMFUNCTION_INSTFILES_SHOW "un.LogFont2"

Function "un.LogFont1"
SetBkColor $HWNDPARENT ${NsisColor}
GetDlgItem $7 $HWNDPARENT 1028
SetBkColor $7 ${NsisColor}
FunctionEnd

Function "un.LogFont2"
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $1 $0 1016
CreateFont $2 "Comic Sans Ms" "8" "500"
SendMessage $1 ${WM_SETFONT} $2 0
FindWindow $R0 "#32770" "" $HWNDPARENT
GetDlgItem $5 $R0 1006
SetBkColor $5 ${NsisColor}
GetDlgItem $8 $HWNDPARENT 1016
SetBkColor $8 ${NsisColor}
FunctionEnd


What you think?

Could you please post the section of your code that colors the buttons? Or is that your default Windows color ?


Yes, is my windows color scheme....
I'm still on that, dude... :)


Same as the uninstaller window, use the code without the GetDlgItem.


Nothing... :(
Now, testing the hole installer... the NSISdl plugin,
how to paint the portion that it uses in the Dialog?


You can't change the background color of NSISdl and StartMenu dialogs yet.


looking for those features :)