Old 8th May 2006, 23:05   #1
Maxim30
Member
 
Maxim30's Avatar
 
Join Date: Sep 2005
Location: Martinsicuro -Teramo- Italy
Posts: 76
Question 3 run checkboxes on the same finish page

Hello,
I would want to have 2 or 3 checkboxes in the finish page to run respective executables installed; I would not want to have multiple finish pages or MUI_FINISHPAGE_RUN_FUNCTION define: how to write the code ?

Massimo
Maxim30 is offline   Reply With Quote
Old 9th May 2006, 06:25   #2
Jnuw
Senior Member
 
Join Date: Sep 2004
Location: Wisconsin, US
Posts: 258
Hello.

The basic idea is you are going to use a pre function of the finish page, check out the "Page Custom Functions" section of the C:\Program Files\NSIS\Contrib\Modern UI\Readme.html. The pre function will allow you to edit the ioSpecial.ini file which controls how the Finish page looks.

Use:

!insertmacro MUI_INSTALLOPTIONS_WRITE "ioFile.ini" "Field #" "Name" "Value"

to add your check boxes, see the "Using InstallOptions for custom pages" section of the same readme.txt.

Then your finish page appears, the user does what ever, and then you can read the "State" of the controls (check boxes) you added using a MUI_PAGE_CUSTOMFUNCTION_LEAVE function.

This should get you started. Check out the readme above, as well as "C:\Program Files\NSIS\Contrib\InstallOptions\Readme.html" for more information on how pages are constructed. Good luck.
Jnuw is offline   Reply With Quote
Old 10th May 2006, 22:54   #3
Maxim30
Member
 
Maxim30's Avatar
 
Join Date: Sep 2005
Location: Martinsicuro -Teramo- Italy
Posts: 76
It is ok.
But the checkboxes and labels have different background color (grey, same as the bottom rectangle with buttons: Windows default I suppose) than the page (white: Windows default I suppose). How to have the checkboxes and labels bakground color equal to the page main window (white, default) ?
I have tried with the following code but the window is all grey not white:
...
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ioSpecial.ini"
!insertmacro MUI_INSTALLOPTIONS_READ $0 "ioSpecial.ini" "Field 4" "hwnd"
!insertmacro MUI_INSTALLOPTIONS_READ $1 "ioSpecial.ini" "Field 5" "hwnd"
SendMessage $0 ${WM_CTLCOLOR} 000000 0
SendMessage $1 ${WM_CTLCOLOR} 000000 0

Massimo
Maxim30 is offline   Reply With Quote
Old 11th May 2006, 10:06   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Use SetCtlColors

-Stu
Afrow UK 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