stb
8th March 2006 08:26 UTC
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
8th March 2006 08:35 UTC
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
8th March 2006 10:46 UTC
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
8th March 2006 11:14 UTC
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
8th March 2006 13:16 UTC
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.
stb
8th March 2006 16:08 UTC
Thanks! It works fine (using MiscButtonText).