Afrow UK
23rd July 2003 17:22 UTC
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
kichik
23rd July 2003 17:32 UTC
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.
Afrow UK
23rd July 2003 18:45 UTC
Works thanks.
Might as well put it on the archive (even though it's small)
-Stu
Afrow UK
23rd July 2003 19:10 UTC
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
Afrow UK
23rd July 2003 19:13 UTC
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
kichik
23rd July 2003 19:15 UTC
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.
kichik
23rd July 2003 19:18 UTC
That text is a MUI text, you can change by loading anohter UI which has different text in dialog number 111.
pengyou
23rd July 2003 19:32 UTC
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."
Afrow UK
23rd July 2003 20:12 UTC
I'll use resource hacker :)
-Stu