Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 20th October 2005, 07:27   #1
AnarkiNet
Guest
 
Posts: n/a
Refreshing MUI InstallOptions page after NOTIFY control used

Heres my situation: I have a custom InstallOptions page with NOTIFY controls, which execute correctly when clicked or manipulated in the compiled installer, but the page doesnt refresh! I have to press "back" then "next" to see the changes that were made.
Heres my custom page code:
code:
Function ShowFileOptions
${If} $ShowLiscense = 0
!insertmacro MUI_INSTALLOPTIONS_WRITE "FileOptions.ini" "Settings" "NextButtonText" "Finish"
${Else}
!insertmacro MUI_INSTALLOPTIONS_WRITE "FileOptions.ini" "Settings" "NextButtonText" "Continue >"
${EndIf}

!insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "FileOptions.ini"
Pop $HWND
!insertmacro MUI_INSTALLOPTIONS_SHOW
FunctionEnd

Function LeaveFileOptions
!insertmacro MUI_INSTALLOPTIONS_READ $R0 "FileOptions.ini" "Settings" "State"
StrCmp $R0 0 Done
StrCmp $R0 7 AddBtn
StrCmp $R0 10 EditBtn
Abort

AddBtn:
!insertmacro MUI_INSTALLOPTIONS_READ $R1 "FileOptions.ini" "Field 3" "State"
!insertmacro SMIS_APPEND "$R1" "FileOptions.ini" "Field 5"
Abort

EditBtn:
!insertmacro MUI_INSTALLOPTIONS_WRITE "FileOptions.ini" "Field 6" "Flags" "DISABLED"
Abort

Done:
FunctionEnd

  Reply With Quote
Old 20th October 2005, 07:50   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You can't do it that way because the InstallOptions page is in memory and no longer read from the INI file.
You must manipulate the dialog in memory with GetDlgItem and SendMessage etc

You already have the code ready to use $HWND in your leave function.

-Stu
Afrow UK is offline   Reply With Quote
Old 20th October 2005, 08:27   #3
AnarkiNet
Junior Member
 
Join Date: Oct 2005
Posts: 1
Is there any more extensive documentation of the SendMessage and related commands? the NSIS help files that come with dont list any of the message numbers and barely glaze over what the function does.
AnarkiNet is offline   Reply With Quote
Old 20th October 2005, 09:55   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Try this example InstallOptions script:
http://nsis.sourceforge.net/mediawik...6/IoColors.zip

-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