2013-04-10 152 views
0

我一直在試圖弄清楚如何做幾天但沒有運氣。在安裝過程中按下返回按鈕時,我試圖返回幾頁。返回按鈕時返回按鈕

我想在頁面的Creater程序中做到這一點。

Page custom printerPage1 verifyPrinterFunc1 ": 1. Printer Bilgileri" 

通常情況下,我能夠通過RelGotoPage功能在安裝過​​程中跳過頁面。

Function RelGotoPage 
    IntCmp $R9 0 0 Move Move 
    StrCmp $R9 "X" 0 Move 
    StrCpy $R9 "3" 
Move: 
    SendMessage $HWNDPARENT "0x408" "$R9" "" 
FunctionEnd 

但我不能這樣做,在後退按鈕按下事件(E.x. ${NSD_OnBack}

我被困,需要從有經驗的頭腦幫助。謝謝。

回答

0
!include nsDialogs.nsh 
Licensedata "${__FILE__}" 
InstallDir $temp 
Page directory 
Page components 
Page license 
Page custom printerPage1 verifyPrinterFunc1 ": 1. Printer Bilgileri" 

Function onBack 
; Go back two pages to the components page 
System::Call 'USER32::PostMessage(i$HWNDPARENT,i0x408,i-2,i0)' 
Abort 
FunctionEnd 

Function printerPage1 
nsDialogs::Create 1018 
Pop $0 
${NSD_OnBack} onBack 
nsDialogs::Show 
FunctionEnd 

Function verifyPrinterFunc1 
FunctionEnd 
+0

非常感謝Anders。 – 2013-04-12 08:03:26

+0

也感謝您的編輯Seki。 – 2013-04-12 08:17:12