Cancel button of custom page malfunction
Hi,
I have a cutom page using the CANCEL button to go to the next page, and using the NEXT button do
some extra evaluations in the function before leave. The problem is that if the function before leave
includes "Abort", the CANCEL button will not go next page, if not, it's fine. Following is the code, if you mask the Abort in the testPageLeave, the problem disappearred.Can anybody help me to solve this problem? Thanks!
#------------------------------------------------
#test.nsi
!include "MUI.nsh"
!define MUI_CUSTOMFUNCTION_ABORT .myuserabort
Function .onInit
InitPluginsDir
File /oname=$PLUGINSDIR\test.ini "test.ini"
FunctionEnd
!insertmacro MUI_PAGE_WELCOME
Page custom testPageShow testPageLeave
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE "English"
OutFile "test.exe"
Section "MainSection" SEC01
SectionEnd
Function testPageShow
Push $R0
InstallOptions::dialog "$PLUGINSDIR\test.ini"
Pop $R0
Pop $R0
FunctionEnd
Function testPageLeave
Abort
FunctionEnd
Function .myuserabort
SendMessage $HWNDPARENT "0x408" "1" ""
Abort
FunctionEnd
#----------------
#test.ini
[Settings]
NumFields=1
[Field 1]
Type=Label
Text=test
Left=10
Right=28
Top=20
Bottom=40