View Single Post
Old 24th April 2019, 11:50   #3
r2du-soft
Senior Member
 
r2du-soft's Avatar
 
Join Date: Nov 2013
Location: Iran
Posts: 334
Also see this Examples:

Example 2:
HTML Code:
!include "MUI2.nsh"

!define MUI_CUSTOMFUNCTION_GUIINIT onGUIInit
Page Custom Button_Test

!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_LANGUAGE English

Var BTN_NEXT


Function onGUIInit
GetDlgItem $0 $HWNDPARENT 1 ;NEXT button
ShowWindow $0 ${SW_HIDE}
FunctionEnd


Function Button_Test

nsDialogs::Create 1044
Pop $R0
${If} $R0 == error
Abort
${EndIf}

${NSD_CreateButton} 80 50 240 90 "NEXT Page Show"
Pop $BTN_NEXT
${NSD_OnClick} $BTN_NEXT BTN_NEXT_Click

nsDialogs::Show
FunctionEnd

Function BTN_NEXT_Click
Pop $0
SendMessage $HWNDPARENT ${WM_COMMAND} 1 "" ;Next
FunctionEnd



Section

SectionEnd



Example 3:
HTML Code:
!include "MUI2.nsh"

Page Custom Button_Test

!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_LANGUAGE English

Var BTN_NEXT


Function Button_Test

nsDialogs::Create 1044
Pop $R0
${If} $R0 == error
Abort
${EndIf}

${NSD_CreateButton} 80 50 240 90 "NEXT Page Show"
Pop $BTN_NEXT
${NSD_OnClick} $BTN_NEXT BTN_NEXT_Click

nsDialogs::Show
FunctionEnd

Function BTN_NEXT_Click
Pop $0
SendMessage $HWNDPARENT ${WM_COMMAND} 1 "" ;Next
FunctionEnd



Section

SectionEnd
r2du-soft is offline   Reply With Quote