Prev Previous Post   Next Post Next
Old 8th March 2019, 19:55   #1
r2du-soft
Senior Member
 
r2du-soft's Avatar
 
Join Date: Nov 2013
Location: Iran
Posts: 342
Wink Leave Custom Page with Custom button

i create two custom page and create a button in custom page 1
now i want when i click on that custom button i leave the custom page 1 and show custom page 2

HTML Code:
!include "MUI2.nsh"


Page Custom Custom_Page_1
Page Custom Custom_Page_2
!insertmacro MUI_LANGUAGE English ;Modern UI
Var nsDialogs
Var BTN_EXT_HWN

XPStyle on


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


${NSD_CreateButton} 40u 40 400 40 "Close Custom Page 1 & Close Custom_Page_1 And Show Custom_Page_2"
Pop $BTN_EXT_HWN
${NSD_OnClick} $BTN_EXT_HWN BTN_EXT_Click

nsDialogs::Show
FunctionEnd

Function BTN_EXT_Click
Pop $0
#Close Custom_Page_1 And Show Custom_Page_2
FunctionEnd


Function Custom_Page_2
nsDialogs::Create 1044
Pop $nsDialogs
;-----------------
${If} $nsDialogs == error
		Abort
${EndIf}
;-----------------

	${NSD_CreateText} 0 13u 50% 50u "You are in Custom_Page_2"
	Pop $0
	Messagebox MB_OK "You in Custom_Page_2"

nsDialogs::Show
FunctionEnd


Section
SectionEnd
r2du-soft is offline   Reply With Quote
 
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump