Skip to content
⌘ NSIS Forum Archive

How to change button caption in InstFiles Page (MUI)

6 posts

stb#

How to change button caption in InstFiles Page (MUI)

Hi,

I already found http://forums.winamp.com/showthread....hreadid=204589 but I didn't get the point in that code (where is the target text).

How to dynamically change the label (text) of the Next button of the MUI_InstFiles page?

(This seems to be a non-ioOptions dialog, writing to the ioSpecial.ini is no solution.)
stb#
I tried

GetDlgItem $R0 $HWNDPARENT 1
SendMessage $R0 ${WM_SETTEXT} 0 "STR:MyText"

in Show and Pre.

This does work, but NSIS sets the text back to the default when instfiles succeeded (when the button gets active again).
kichik#
You can set the button's text to a variable using the normal methods and change that variable at runtime to whatever you want. You can use $(^NextBtn), $(^InstallBtn) and others (see Contrib\Language Files\English.nlf for the complete list) to get the default texts.
stb#
Hi kichik,

what do you mean exactly?


GetDlgItem $R0 $HWNDPARENT 1
SendMessage $R0 ${WM_SETTEXT} 0 "STR:$(^CloseBtn)"

doesn't work in MUI_PAGE_INSTFILES (see second post). I think it would work on other pages because their buttons do not change after Show callback function.
kichik#
I mean you set it to $0 using the normal methods, like InstallButtonText and not with SendMessage. Then, you change $0 to whatever you want in every page. This way, even when NSIS sets the text on its own where you can't, you'll have control of the text.