bambou51
25th July 2006 10:36 UTC
How to go previous from a dll dialog box
During my setup I display a dialog box (from a dll), which has a previous and OK button. From my script I know which button has been clicked on, but I don't know how to force the previous page to been displayed.
Is there a way to call the previous page ?
bambou51
27th July 2006 18:03 UTC
Ok, I tried it, it first seems to work but now when I try to back it kind of freeze my setup: next/previous and cancel buttons are no more working, I need to kill the task.
Here is my code:
!insertmacro MUI_PAGE_LICENSE $(myLicenseData)
!define MUI_PAGE_CUSTOMFUNCTION_PRE displayOFDDialog
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE dirLeave
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_STARTMENU "Application" $SHORTCUT_FOLDER
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE shortcutsLeave
!insertmacro MUI_PAGE_FINISH
...
Function RelGotoPage
IntCmp $R8 0 0 Move Move
StrCmp $R8 "X" 0 Move
StrCpy $R8 "120"
Move:
SendMessage $HWNDPARENT "0x408" "$R8" ""
FunctionEnd
...
Function displayOFDDialog
StrCpy $0 ""
System::Call 'OFD::func1(t .r0) i .r1 ?u'
Pop $1
${If} $1 = 12
; Previous
StrCpy $R8 -1 ; Goto the previous page
Call RelGotoPage
Abort
${Else}
; OK
...
FunctionEnd
So when I press previous button of my dialog box, it now displays the previsou page but I am stuck on it.
Any idea ?
Afrow UK
28th July 2006 10:46 UTC
Try setting Function displayOFDDialog as a SHOW function instead of PRE function.
-Stu
bambou51
28th July 2006 12:48 UTC
once again Thanks !!