Archive: Redrawing an InstallOptions INI Custom Page


Redrawing an InstallOptions INI Custom Page
I'm at a lost here and the "Search" button sort of explained somethings but not others.

What I want is to have a checkbox that enables two TEXTFIELDS during my install using MUI and INSTALLOPTIONS. I thought I could just null the DISABLED flags from the Textfields and then Abort to have the window redraw. No such luck.

The threads seem to point to SEND MESSAGE but I'm not sure how to use it.

How do you do this exactly? Any help would be greatly appreciated!

Thanks!


Disable the check boxes with EnableWindow. You can read the window handle from the HWND= entry with MUI_INSTALLOPTIONS_READ.
InstallOptions does not read from the INI file again when you call Abort in the pages' Leave function. This would be noticably slow.

-Stu


Can you get a quick example? I think I'm sort of getting it. These interfaces with respect to the window are a tad cumbersome.


Originally posted by Afrow UK
Disable the check boxes with EnableWindow. You can read the window handle from the HWND= entry with MUI_INSTALLOPTIONS_READ.
InstallOptions does not read from the INI file again when you call Abort in the pages' Leave function. This would be noticably slow.

-Stu
Btw Stu, would I do this after I have extracted and displayed the InstallOptions...I'm going to play with this after lunch!

If you want your controls to refresh based on whether the user clicks a checkbox, then create your custom page with the NOTIFY flag set on your checkbox. Then, create a leave function for your page to do the work. (Look in your ${NSISDIR}\Examples\InstallOptions folder for the "TestNotify.nsi" file)

If you need to set option on the page at runtime BEFORE you display the page, then you'll have to use MUI_INSTALLOPTIONS_INITDIALOG to intialize your page and make changes and then MUI_INSTALLOPTIONS_SHOW to display the page. (Both commands are outlined in the MUI docs included with NSIS).


Comperio, yeah that is what I'm doing. The issue is to REFRESH the changes during the callback (after NOTIFY). That part seems to be the challenge since I need to use EnableWindow apparently...I'm trying it now...any examples would be much appreciated of course! :D


Nevermind, it works now! Thanks guys for the tips. I just had to turn on the DISABLE FLAG first and then renable it using the EnableWindow command. Cool beans!