Archive: Refreshing MUI InstallOptions page after NOTIFY control used


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:

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

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


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.


Try this example InstallOptions script:
http://nsis.sourceforge.net/mediawik...6/IoColors.zip

-Stu