Default button in a MessageDlg box


How can I determine wich button will be the default on in a MessageDlg box ?

MessageDlg('bla bla ?' , mtConfirmation,
      [mbYes, mbNo], 0) = mrYes ;
I want the "No" button to be the default one.
stendresseAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Mohammed NasmanConnect With a Mentor Software DeveloperCommented:
I think u can't do that by MessageDlg

 try to use messagebox instead of messagedlg

MessageBox(handle,'Any Message','Any title', MB_YesNoCancel + MB_IconStop + MB_DefButton3)

Best regards
Mohammed Nasman
0
 
edsteeleCommented:
You should be able to do it by placing the mbNo entry before the mbYes entry.  This will have the side effect of make the "No" button on the left and the "Yes" button on the right.  If you can live with that, then here is your new code:

MessageDlg('bla bla ?' , mtConfirmation, [mbNo, mbYes], 0) = mrYes;
0
 
stendresseAuthor Commented:
thank you edsteele, but I already tried that but it do not work :(
0
 
edsteeleCommented:
Really?!?  What did it give you?
0
All Courses

From novice to tech pro — start learning today.