Jnuw
18th January 2005 21:20 UTC
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.
kike_velez
19th January 2005 09:00 UTC
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
kichik
20th January 2005 18:24 UTC
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
Jnuw
27th January 2005 22:55 UTC
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.
kichik
27th January 2005 22:57 UTC
The source code, namely resource.rc and resource.h or simply using Resource Hacker.
Yathosho
14th February 2005 22:29 UTC
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).
Anders
15th February 2005 04:11 UTC
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) )
Yathosho
15th February 2005 13:06 UTC
deleted post - problem solved.. thanks everybody