Skip to content
⌘ NSIS Forum Archive

InstallOption Reload

9 posts

mrbean87#

InstallOption Reload

Is there some way I can reload a page with InstallOption? I tried to use call the dll again, but it seems that after a InstallOption::dialog instruction, every other thing it's ignored...
goldy1064#
Once the page is shown, you can't refresh it. You may only change what's in the controls in the pre function for a page. You could leave a page in the callback post function and then have a switch in the next pages pre function to go back to the previous page to get a pseudo-refresh action.
Afrow UK#
If you need to modify controls on the dialog you must use GetDlgItem then instructions like SendMessage, SetCtlColors, EnableWindow, ShowWindow etc
Changes to the INI file will not be shown on the dialog because at this time the dialog is in memory.

-Stu
mrbean87#
Basically I need to add a item to the list of a DropList; I searched by I coudn't find any message to do this, so I was trying to modify the ini of the page, then reload it, but this seems impossible...
bholliger#
Hi mrbean87!

A possible solution is to go to the next page and in the preFunction of that page use sendmessage to go one page back. This will reload the page.


Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.


Have a nice day!

-Bruno.
Afrow UK#
That would be a bad way to go about it as it would require the page to be unloaded and then reloaded into memory.

A much much faster way to do this is by using the CB_ADDSTRING message:
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.


-Stu