Nsdialogs skipping pages backwards
Hello,
I'm used to create installers with nsis, but now im facing a problem.
What I currently have:
A full working installer with about 6 custom pages, the only default page is instfiles, all others are custom pages.
What I want to achieve:
When clicking the "back" buttom, go back 2 pages (custom pages)
The problem:
Im using some code of the forum, calling the function 'RelGotoPage' to skip pages forward and back.
When I use the function on leave function, it works ok, but when I use in conjunction with ${NSD_OnBack} it does not work.
I even tried to set a variable ($CP_SKIP) at OnBack function and the parse with the code below to go one page back, but no success.
$CP_SKIP will be set to 1 only when user click back at certain page.
If I use the RelGotoPage at OnBack it does not work and neither on the page's code.
The onback function is called correctly, i've tested with a messagebox
Here the snippet to back 1 (one) page, written on a custom page (before the create function)
${IF} $CP_SKIP == "1"
StrCpy $R9 "-1"
Call RelGotoPage
STRCPY $CP_SKIP 0
${ENDIF}
Function to skip pages:
Function RelGotoPage
IntCmp $R9 0 0 Move Move
StrCmp $R9 "X" 0 Move
StrCpy $R9 "120"
Move:
SendMessage $HWNDPARENT "0x408" "$R9" ""
FunctionEnd
If more information needed, just ask.
ps: sorry the bad english, i'm brazilian