Skip to content
⌘ NSIS Forum Archive

MessageBox : default button

8 posts

Totoche2607#

MessageBox : default button

Hello,

With a simple MessageBox (YES, NO), "yes" is selected by default.
And i don't find how to make "No" by default.

Thank you,
Totoche2607#
Good evening,

The result of "MB_DEFBUTTON2" cancel the messagebox ...
I would like "NO" to be pre-selected in the message box and that you give me has answered "No" automaticly without asking the question!

Maybe I haven't put it in the right place ;-)
before
   DefaultMessage:
StrCpy "$4" "$ExecuteProg" -4
MessageBox MB_YESNO|MB_TOPMOST|MB_ICONQUESTION `Voulez vous lancer $4?` IDYES WorkingDir IDNO EndLaunchApp

PersonnalMessage:
MessageBox MB_YESNO|MB_TOPMOST|MB_ICONQUESTION `$MessageToShow` IDYES WorkingDir IDNO EndLaunchApp
after
   DefaultMessage:
StrCpy "$4" "$ExecuteProg" -4
MessageBox MB_YESNO|MB_DEFBUTTON2|MB_TOPMOST|MB_ICONQUESTION `Voulez vous lancer $4?` IDYES WorkingDir IDNO EndLaunchApp

PersonnalMessage:
MessageBox MB_YESNO|MB_DEFBUTTON2|MB_TOPMOST|MB_ICONQUESTION `$MessageToShow` IDYES WorkingDir IDNO EndLaunchApp
Totoche2607#
Hello,

and good morning...the night very good and profitable.

My mistake, it works very good...

Sorry and thank you very much Yathosho

[edit]Is there a place with a liste off all the messagebox option ?!?
Totoche2607#
Hello,

that's exactly what I don't find! A "documentation" page on the website...

a link please ...
kichik#


C:\Program Files\NSIS\NSIS.chm