Archive: Disable header text on _all_ pages


Disable header text on _all_ pages (Modern UI)
How do I disable the text that shows up on top of each page? ("Choose the place you want to install the program in" and such).

Setting the MUI_HEADERIMAGE macro and a bitmap disables it for only one page, when it goes to the next page the text appears again. May this be a bug?

Also, if it cannot be disabled, is there any way to set the text background color to transparent (as a workaround)?

Thanks in advance.


If you don't want the white header, don't use the MUI. You can also create your own UI for the MUI by editing Contrib\UIs\modern.exe using Resource Hacker. See MUI_UI in the MUI readme for more information on using your new UI with the MUI.


Yeah, but what I want to know is:
Why does it disappear when I set a header image and, in the next page, it appears again?


MUI_HEADERIMAGE doesn't do that. It doesn't happen in Examples\Modern UI\HeaderBitmap.nsi. It must be something else in your script, attach it.


Here goes:


; Half-Life 2 setup script
; --------------------------

!include "MUI.nsh"
;!define MUI_ICON "c:\icono.ico"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "c:\hader.bmp"
!define MUI_HEADERIMAGE_BITMAP_NOSTRETCH
!define MUI_CUSTOMFUNCTION_GUIINIT myOnGUIInit

; Installer stuff
OutFile hl2_installer.exe
InstallDir $PROGRAMFILES
Name "Half-Life 2"
XPStyle on

; Pages
!define MUI_WELCOMEFINISHPAGE_BITMAP "c:\welcome.bmp"
!define MUI_DIRECTORYPAGE_VARIABLE $INSTDIR
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES

; Language
!insertmacro MUI_LANGUAGE "Spanish"
LangString SEC_GAME_NAME ${LANG_SPANISH} "Juego"
LangString SEC_TRANS_NAME ${LANG_SPANISH} "Traducción al español"

; Sections
SectionGroup /e "Half-Life 2" SEC_HL2
Section $(SEC_GAME_NAME) SEC_GAME
SetOutPath $INSTDIR
AddSize 1 ;3385648
SectionEnd
Section $(SEC_TRANS_NAME) SEC_TRANS
SetOutPath $INSTDIR
SectionEnd
SectionGroupEnd

; Section descriptions
LangString SEC_GAME_DESC ${LANG_SPANISH} "Comprende los archivos necesarios para la instalación de Half-Life 2 (en inglés)."
LangString SEC_TRANS_DESC ${LANG_SPANISH} "Comprende los archivos necesarios para traducir el juego al español."
LangString SEC_HL2_DESC ${LANG_SPANISH} "Half-Life 2. Valve (R)"

!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_GAME} $(SEC_GAME_DESC)
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_TRANS} $(SEC_TRANS_DESC)
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_HL2} $(SEC_HL2_DESC)
!insertmacro MUI_FUNCTION_DESCRIPTION_END

; myOnGUIInit
Function myOnGUIInit
InitPluginsDir
StrCpy $INSTDIR "$PROGRAMFILES\Valve\Half-Life 2"
BgImage::SetBg /nounload c:\puente.bmp
BgImage::Redraw /nounload
FunctionEnd

The header text shows on all pages for me, using your script. In which page does it not show for you?

Please attach scripts next time. To attach, don't use the quick reply box, but the Post a Reply button.


Sorry, it was my fault. I thought that the header image had to fill the entire header space, not just 150x57...
Seems that setting the MUI_HEADERIMAGE_BITMAP_NOSTRETCH macro made the image appear over the text (bug).

Now I'll have to edit modern.exe, it seems...

Sorry about that I didn't attach the script, I read your post too fast :)

Thanks for the help.