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.
A couple page questions...
8 posts
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
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:
To hide the back button, use GetDlgItem and ShowWindow. For example:
GetDlgItem $0 $HWNDPARENT 3
ShowWindow $0 0
Originally posted by kichikThanks 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.
To hide the back button, use GetDlgItem and ShowWindow. For example:GetDlgItem $0 $HWNDPARENT 3
ShowWindow $0 0
The source code, namely resource.rc and resource.h or simply using Resource Hacker.
Originally posted by kichiki was always wondering where to put these lines.. say i want to hide the back button of the components page (modern ui).
To hide the back button, use GetDlgItem and ShowWindow. For example:GetDlgItem $0 $HWNDPARENT 3
ShowWindow $0 0
Originally posted by Yathoshoin the show "callback" for the page ( define MUI_PAGE_CUSTOMFUNCTION_SHOW function (right before the macro for the page) )
i was always wondering where to put these lines.. say i want to hide the back button of the components page (modern ui).
deleted post - problem solved.. thanks everybody