Archive: Cancel button text


Cancel button text
I'm using "Close" instead of "Cancel" for my Cancel button text.
I was wondering if I could use GetDlgItem and SendMessage to change the text to "Cancel" for my InstFiles Page (I'm using NSISdl on it)

I looked for the button define in resource.h but it doesn't mention cancel.

Thanks

-Stu


IDCANCEL is its id. It's a standard Windows id. The number you're looking for is 2. You can find the numbers using Resource Hacker.


Works thanks.
Might as well put it on the archive (even though it's small)

-Stu


I'm trying to do the other buttons now (Next, Install, Finish, Browse... etc) but it isn't working.
Is it because NSIS changes the text after I do?

-Stu


I also have another question.
My installer gets "Please wait while Setup is loading..." on start up.
Is there any way to change this?

GetDlgItem $R0 $HWNDPARENT 76
SendMessage $R0 ${WM_SETTEXT} 0 "STR:My loading text"

I doubt this will work (called .onInit)?

-Stu


Nope, even the pre function which you're not supposed to use is called after the buttons are set. If you want to make sure nothing else changes it use a message box after you set the text to block everything else.


That text is a MUI text, you can change by loading anohter UI which has different text in dialog number 111.


From the MUI ReadMe:

"The 'Please wait while Setup is loading...' text on the splash screen which is being displayed when the installer is starting (Verifying installer, Unpacking data) cannot be changed by the script, because the installer is not started yet when this dialog is being displayed. If you want to change this text, modify dialog 111 of modern.exe.
The 'Verifying installer' and 'Unpacking data' texts are defined in the language header file of the NSIS exehead (Source\exehead\lang.h). To change them, you need to edit this file and recompile NSIS."


I'll use resource hacker :)

-Stu