Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 29th May 2003, 15:28   #1
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,898
Post Using SetBkColor to paint the Installer's dialogs

Ok!
Let's try it...
I'm painting all the dialogs...
-Welcome Page. Done
-My first custome page I use a groupbox, I paint the dialog ID,
but can't paint the inside, anyone know how?
Thanks
Attached Images
File Type: jpg ss0.jpg (25.3 KB, 125 views)


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux w/ xfce4.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Debian unstable w/ xfce4.
Joel is offline   Reply With Quote
Old 29th May 2003, 16:27   #2
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,898
I just found that there's a block in each
dialog in the center.
Anyone know that ID, I can't paint that portion...


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux w/ xfce4.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Debian unstable w/ xfce4.
Joel is offline   Reply With Quote
Old 29th May 2003, 16:56   #3
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,338
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 29th May 2003, 17:01   #4
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,898
Thanks kichik
But this thread actually helps... wow...


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux w/ xfce4.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Debian unstable w/ xfce4.
Joel is offline   Reply With Quote
Old 29th May 2003, 17:33   #5
IceCork
Junior Member
 
Join Date: Sep 2002
Posts: 15
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 ?
IceCork is offline   Reply With Quote
Old 29th May 2003, 17:41   #6
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,898
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...


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux w/ xfce4.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Debian unstable w/ xfce4.
Joel is offline   Reply With Quote
Old 29th May 2003, 18:49   #7
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,898
Fixed that
Thanks anyway!

[edit]
This is my code:
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]


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux w/ xfce4.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Debian unstable w/ xfce4.

Last edited by Joel; 29th May 2003 at 19:27.
Joel is offline   Reply With Quote
Old 30th May 2003, 13:38   #8
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,338
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 30th May 2003, 15:20   #9
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,898
Hi KichiK!
Almost done. See the attach file... working great...but there are
some areas left... I use this code, and it works:
code:

!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?
Attached Images
File Type: jpg ss1.jpg (20.9 KB, 101 views)


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux w/ xfce4.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Debian unstable w/ xfce4.
Joel is offline   Reply With Quote
Old 30th May 2003, 15:26   #10
IceCork
Junior Member
 
Join Date: Sep 2002
Posts: 15
Could you please post the section of your code that colors the buttons? Or is that your default Windows color ?
IceCork is offline   Reply With Quote
Old 30th May 2003, 15:31   #11
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,898
Yes, is my windows color scheme....
I'm still on that, dude...


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux w/ xfce4.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Debian unstable w/ xfce4.
Joel is offline   Reply With Quote
Old 30th May 2003, 16:46   #12
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,338
Same as the uninstaller window, use the code without the GetDlgItem.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 30th May 2003, 21:33   #13
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,898
Nothing...
Now, testing the hole installer... the NSISdl plugin,
how to paint the portion that it uses in the Dialog?


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux w/ xfce4.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Debian unstable w/ xfce4.
Joel is offline   Reply With Quote
Old 31st May 2003, 12:06   #14
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,338
You can't change the background color of NSISdl and StartMenu dialogs yet.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 31st May 2003, 15:54   #15
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,898
looking for those features


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux w/ xfce4.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Debian unstable w/ xfce4.
Joel is offline   Reply With Quote
Reply
Go Back   Winamp 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