Archive: Cannot show 'Cancel' button when installing files!


Cannot show 'Cancel' button when installing files!
!define MUI_PAGE_CUSTOMFUNCTION_PRE MyInstPre
!insertmacro MUI_PAGE_INSTFILES
----------------------------------------------------
Function MyInstPre
GetDlgItem $MUI_TEMP1 $HWNDPARENT 2 //'Cancel'
ShowWindow $MUI_TEMP1 ${SW_SHOW}

GetDlgItem $MUI_TEMP1 $HWNDPARENT 1 //'Next'
ShowWindow $MUI_TEMP1 ${SW_HIDE}

GetDlgItem $MUI_TEMP1 $HWNDPARENT 3 //'Back'
ShowWindow $MUI_TEMP1 ${SW_HIDE}
FunctionEnd
-----------------------------------------------------
When installing files,'Next','Back',and 'Cancel' buttons are disable at the default state of NSIS.So I want to hide
'Next' and 'Back' buttons,and show 'Cancel' button.

With the top codes,I can hide 'Next' and 'Back' buttons,but I can not show 'Cancel' button.what's the reason?

Thanks.:rolleyes: :up: :up:


Sorry,I was careless.should use EnableWindow .


Showing or enabling it won't help you. When the user clicks it, the installation process would not be canceled properly.