diff --git a/Contrib/nsDialogs/Readme.html b/Contrib/nsDialogs/Readme.html index e69dcf79..d21a4855 100644 --- a/Contrib/nsDialogs/Readme.html +++ b/Contrib/nsDialogs/Readme.html @@ -35,6 +35,7 @@ code
So far we have a page that has some basic input controls. But what happens when the user goes to the next page and comes back? With the current code, the user's input will not be remembered. To remember, we'll use the already present leave callback function to store the user's choice in variables and pass these values when creating the controls the next time. For a better example, we'll also add a checkbox to the page and use ${NSD_GetState} and ${NSD_SetState} to get and set its state.
+ +For clarity, we'll remove some of the notifications from the previous step.
+ ++!include nsDialogs.nsh +!include LogicLib.nsh + +Name nsDialogs +OutFile nsDialogs.exe + +XPStyle on + +Var Dialog +Var Label +Var Text +Var Text_State +Var Checkbox +Var Checkbox_State + +Page custom nsDialogsPage nsDialogsPageLeave +Page license +Page instfiles + +Function .onInit + + StrCpy $Text_State "Type something here..." + +FunctionEnd + +Function nsDialogsPage + + nsDialogs::Create /NOUNLOAD 1018 + Pop $Dialog + + ${If} $Dialog == error + Abort + ${EndIf} + + ${NSD_CreateLabel} 0 0 100% 12u "Hello, welcome to nsDialogs!" + Pop $Label + + ${NSD_CreateText} 0 13u 100% 12u $Text_State + Pop $Text + + ${NSD_CreateCheckbox} 0 30u 100% 10u "&Something" + Pop $Checkbox + + ${If} $Checkbox_State == ${BST_CHECKED} + ${NSD_Check} $Checkbox + ${EndIf} + + nsDialogs::Show + +FunctionEnd + +Function nsDialogsPageLeave + + ${NSD_GetText} $Text $Text_State + ${NSD_GetState} $Checkbox $Checkbox_State + +FunctionEnd + +Section + + DetailPrint "hello world" + +SectionEnd