Archive: A couple page questions...


A couple page questions...
Hello all.

After making a couple of NSIS installers using the standard pages, I just completed my first installer with 2 of the 3 pages being custom. I have a couple of questions now.

1. Can I change the size of font in a Label Control within my custom welcome page?

2. Can I change what the text reads in the header title and subtitle in the standard MUI_PAGE_INSTFILES page?

3. Can I remove the <Back button all together from my custom finish page, so that only the Close button remains?

I checked the InstallOptions Readme, Modern UI Readme, the NSIS help file, and searched this forum, but did not find an answer, forgive me if I miss something. Thanks all.


Hello Jnuw

1) If you have this

Page custom SetCustomA

you nee to do something like this :

Function SetCustomA
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "entradaA.ini"
Pop $HWND ;HWND of dialog
GetDlgItem $DLGITEM $HWND 1201 ;1200 + Field number - 1
;DLGITEM contains the HWND of the field
CreateFont $FONT "Verdana" 8 650
SendMessage $DLGITEM ${WM_SETFONT} $FONT 0
!insertmacro MUI_INSTALLOPTIONS_SHOW

You can see CreateFont at the Nsis documentation.

2)To do that i modified the file *.nsh of the language

!define MUI_TEXT_COMPONENTS_TITLE
!define MUI_TEXT_COMPONENTS_SUBTITLE

I think that is not too elegant but ...:)

3)I think that is possible but i canĀ“t help because i never used this.

Best regards


There is no need to change the .nsh file. Simply define MUI_PAGE_HEADER_TEXT and MUI_PAGE_HEADER_SUBTEXT right above the inclusion of the page macro.

To hide the back button, use GetDlgItem and ShowWindow. For example:

GetDlgItem $0 $HWNDPARENT 3
ShowWindow $0 0

Originally posted by kichik
To hide the back button, use GetDlgItem and ShowWindow. For example:
GetDlgItem $0 $HWNDPARENT 3
ShowWindow $0 0
Thanks Kichik, that works well. Is there an easy way of finding out what the DlgItem number is for other controls on MUI pages? Just thinking ahead. Thanks.

The source code, namely resource.rc and resource.h or simply using Resource Hacker.


Originally posted by kichik
To hide the back button, use GetDlgItem and ShowWindow. For example:
GetDlgItem $0 $HWNDPARENT 3
ShowWindow $0 0
i was always wondering where to put these lines.. say i want to hide the back button of the components page (modern ui).

Originally posted by Yathosho
i was always wondering where to put these lines.. say i want to hide the back button of the components page (modern ui).
in the show "callback" for the page ( define MUI_PAGE_CUSTOMFUNCTION_SHOW function (right before the macro for the page) )

deleted post - problem solved.. thanks everybody