Skip to content
⌘ NSIS Forum Archive

Message Box Title

8 posts

jonnebonne#

Message Box Title

Hi 🙂 I am new here and almost new to the NSIS installer.
First of all, I wonder if there is a way to change the title of a message box:
MessageBox MB_OK "This is a test :P"

I am a skilled VB programmer, and in VB I use:
MsgBox "This is a test :P", vbInformation, "This is the title I wonder excist in NSIS ;P"
----------------------------
Question nr. 2:
I have seen some msgbox examples (in NSIS) where it is possible to make a default icon (instead of a Question or a Exclamation icon)... If it's possible, how can I change this icon?

Thank you! 🙂
BTW: NSIS is a very nice install system tnx!👍
Joel#
Or just call it from the system plugin API

Name "example"
Caption "example"
XPStyle on
ShowInstDetails show
OutFile "example.exe"

Section -default
System::Call 'user32::MessageBox(i $HWNDPARENT, t "Message title", t "Message body", i 64) v r0'
SectionEnd
😉
Comm@nder21#
to the devs:
what about adding another optional param to the messagebox command? so, if the last param (the title) is empty, default title will be used.
Jnuw#
Originally posted by Comm@nder21
to the devs:
what about adding another optional param to the messagebox command? so, if the last param (the title) is empty, default title will be used.
This would be great.
Afrow UK#
It can't be the last paramater as the last paramaters are the jump-to's for the MessageBox buttons. It can't be a paramater before those though because that would mean all the current NSIS scripts would have to be changed ("" added).

It could be added to the actual text string, so you'd put Title:my title at the end of the string (or something).

-Stu