Archive: MUI and the ghost button close .....


MUI and the ghost button close .....
Hi,

My QA department saw somthing, I never realy saw before.
During the installation of files for the setup, the available
buttons are <back, next>, cancel. back and next are unavailable.
When the installation of files are done. <back and Cancel become unavailable and next> become availalbe.
When I click on this button, a Close button appear quicly and desapear, and the finish page appear.

Why This buttun "Close" apppear ? It is normal ?
Maybe it's due to the ToggleInstFiles.dll plugins ?
to add the show/unshow files during install....

thanks.
Here is a part of my nsis file:

; Welcome page
!insertmacro MUI_PAGE_WELCOME
; License page
!define MUI_LICENSEPAGE_RADIOBUTTONS
!insertmacro MUI_PAGE_LICENSE "../../setup_files/license.rtf"
; Components page
!insertmacro MUI_PAGE_COMPONENTS
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
!define MUI_PAGE_CUSTOMFUNCTION_PRE UnloadToggleInstFiles
!define MUI_FINISHPAGE_NOAUTOCLOSE
; finish Page
!insertmacro MUI_PAGE_FINISH


This occurs because the default text to close the installer (on the close button) is "Close". The Finish page however changes it to "Finish" through the InstallOptions plugin (which it uses as it is a InstallOptions dialog).
It can take a while to load an InstallOptions dialog on older systems and this is why you often get a pause in between.

Try this:

!include WinMessages.nsh

!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_PAGE_CUSTOMFUNCTION_PRE FinishPre
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_LANGUAGE English

Function FinishPre
GetDlgItem $R0 $HWNDPARENT 1
SendMessage $R0 ${WM_SETTEXT} "" "STR:Finish"
FunctionEnd


-Stu