Old 28th January 2006, 12:20   #1
jMrX
Junior Member
 
Join Date: Jan 2006
Location: Philippines
Posts: 15
Send a message via Yahoo to jMrX
How can i change the COLOR?

i am using UltramodernUI as skin for my installer. how can i correct the this picture(page).

Thank you!.

This is the code:

; to show the page
Page Custom serialPage serialPageLeave


i know how to call page using !insertmacro but i have no idea to create a custom one same with d picture.
Attached Files
File Type: rar pic.rar (44.4 KB, 577 views)
jMrX is offline   Reply With Quote
Old 29th January 2006, 06:33   #2
jMrX
Junior Member
 
Join Date: Jan 2006
Location: Philippines
Posts: 15
Send a message via Yahoo to jMrX
this is the Function Code:

PHP Code:
Function serialPage

 
!insertmacro MUI_HEADER_TEXT "Enter Serial Code" "Enter the software serial code to continue."

 
PassDialog::Dialog Serial            \
                    /
HEADINGTEXT 'Please enter the serial code ...' \
                    /
CENTER             \
                    /
BOXDASH 12  70 4 '' \
                    /
BOXDASH 92  70 4 ''  \
                    /
BOXDASH 172 70 4 ''   \
                    /
BOXDASH 252 70 4 ''    \
                    /
BOX     332 70 4 ''

  
Pop $R0 # success, back, cancel or error

FunctionEnd
Function serialPageLeave

 
## Pop values from stack
 
Pop $R0
 Pop $R1
 Pop $R2
 Pop $R3
 Pop $R4

 
## A bit of validation
 
StrCmp $R0 'xxxx' +4
 StrCmp $R1 
'xxxx' +3
 StrCmp $R2 
'xxxx' +3
 StrCmp $R3 
'xxxx' +3
 StrCmp $R4 
'xxxx' +3
  MessageBox MB_OK
|MB_ICONEXCLAMATION "Invalid Key!"
  
Abort

 
## Display the values
 
MessageBox MB_OK|MB_ICONINFORMATION "Key Accepted!"

FunctionEnd 
jMrX is offline   Reply With Quote
Old 2nd February 2006, 18:13   #3
jMrX
Junior Member
 
Join Date: Jan 2006
Location: Philippines
Posts: 15
Send a message via Yahoo to jMrX
Pls Rply to my post i really really nid this next week thanks..
jMrX is offline   Reply With Quote
Old 3rd February 2006, 04:34   #4
jMrX
Junior Member
 
Join Date: Jan 2006
Location: Philippines
Posts: 15
Send a message via Yahoo to jMrX
This is The picture pls rply for my post i really really really really need this.. NSIS PROs i need your help pls correct the color! thanks. And if its impossible, just rply your comments or suggestion thanks...

jMrX is offline   Reply With Quote
Old 3rd February 2006, 04:35   #5
jMrX
Junior Member
 
Join Date: Jan 2006
Location: Philippines
Posts: 15
Send a message via Yahoo to jMrX
jMrX is offline   Reply With Quote
Old 3rd February 2006, 10:44   #6
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
From PassDialog's documentation:
code:
PassDialog::InitDialog /NOUNLOAD [dialog_name] [params]
Pop $HWNDVar
PassDialog::Show
Pop $Var

[dialog_name] : password, userpass, serial, inputbox
$HWNDVar : HWND handle of the window
$Var : success, back, cancel, error
[params] : Described under General Parameters

This method allows you to modify controls on the dialog with
SendMessage, SetCtlColors etc by using the $HWNDVar between
the InitDialog and Show calls, and also in the Page's Leave
function.

Use InitDialog and Show instead of just Dialog and then use SetCtlColors in between.

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 4th February 2006, 06:41   #7
jMrX
Junior Member
 
Join Date: Jan 2006
Location: Philippines
Posts: 15
Send a message via Yahoo to jMrX
i use your code but my other page turns in to gray color.. why?? how can i insert a MUI CUSTOM PAGE and then i will put my entir script on that. thanks..
jMrX is offline   Reply With Quote
Old 4th February 2006, 10:14   #8
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Example:
code:
PassDialog::InitDialog /NOUNLOAD Serial
/HEADINGTEXT 'Please enter the serial code ...'
/CENTER
/BOXDASH 12 70 4 ''
/BOXDASH 92 70 4 ''
/BOXDASH 172 70 4 ''
/BOXDASH 252 70 4 ''
/BOX 332 70 4 ''
Pop $R0 # HWND

GetDlgItem $R1 $R0 1213
SetCtlColors $R1 000000 999999

PassDialog::Show
Pop $R0 # success, back, cancel or error



This will change the colour of the heading text static label (IDC 1213). For a complete list of control ID's open up resource.h in Notepad. For the serial boxes, they start at 1200 incrementing by 1 for each serial box.

Edit: In fact I forgot to mention that the UserPass.nsi example script changes the colour of the user name and password fields.

-Stu
Afrow UK is offline   Reply With Quote
Old 4th February 2006, 17:12   #9
jMrX
Junior Member
 
Join Date: Jan 2006
Location: Philippines
Posts: 15
Send a message via Yahoo to jMrX
i test all the combination but still id didnt work. i want to change the color of the whole dialog and make it similar to the red style color of my MUI PAGE... how can i do that?, im too beginner to Solve the problem so pls help me. thanks...
jMrX is offline   Reply With Quote
Old 6th February 2006, 17:59   #10
jMrX
Junior Member
 
Join Date: Jan 2006
Location: Philippines
Posts: 15
Send a message via Yahoo to jMrX
awts no one can help me??? huhuhu so sad.. anyways just post your suggestion what will i do regarding the problem.. thnkxxx
jMrX is offline   Reply With Quote
Old 7th February 2006, 17:23   #11
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
This will set the background of the dialog to red. You'd probably want to set the same color for th rest of the controls. Use the method exampled in Afrow's post.
code:
PassDialog::InitDialog /NOUNLOAD Serial \
/HEADINGTEXT 'Please enter the serial code ...' \
/CENTER \
/BOXDASH 12 70 4 '' \
/BOXDASH 92 70 4 '' \
/BOXDASH 172 70 4 '' \
/BOXDASH 252 70 4 '' \
/BOX 332 70 4 ''
Pop $R0 # HWND

SetCtlColors $R0 "" ff0000

PassDialog::Show
Pop $R0 # success, back, cancel or error


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 9th February 2006, 11:39   #12
jMrX
Junior Member
 
Join Date: Jan 2006
Location: Philippines
Posts: 15
Send a message via Yahoo to jMrX
thnksz...
jMrX 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