!include "nsDialogs.nsh"
!include "winmessages.nsh"
!include "logiclib.nsh"
OutFile "test.exe"
Page Custom pre
var dialog
var hwnd
var button
Function pre
nsDialogs::Create 1018
Pop $dialog
${NSD_CreateCheckbox} 0 0 50% 6% "I do not quit"
Pop $hwnd
${NSD_OnClick} $hwnd EnDisableButton
nsDialogs::Show
FunctionEnd
Function EnDisableButton
Pop $hwnd
${NSD_GetState} $hwnd $0
${If} $0 == 1
Quit ;-----I do not quit
${EndIf}
FunctionEnd
Section ""
SectionEnd
Quit if you let me know how?
nsDialogs $ {NSD_OnClick} Function in the Quit command is not??
3 posts
Function EnDisableButton
${NSD_GetState} $hwnd $0
${If} $0 = 1
Quit ;-----I do not quit
${EndIf}
FunctionEnd
Or try to replace "Quit" with "SendMessage $HWNDPARENT ${WM_CLOSE} 0 0"
${NSD_GetState} $hwnd $0
${If} $0 = 1
Quit ;-----I do not quit
${EndIf}
FunctionEnd
Or try to replace "Quit" with "SendMessage $HWNDPARENT ${WM_CLOSE} 0 0"
We've solved thanks!