+ (
+ "Answer &Yes",
+ "Answer &No",
+ "Refuse to answer"
+ ) )
+ {
+ extmsg = "This platform supports custom button labels,\n"
+ "so you should see the descriptive labels below.";
+ }
+ else
+ {
+ extmsg = "Custom button labels are not supported on this platform,\n"
+ "so the default \"Yes\"/\"No\"/\"Cancel\" buttons are used.";
+ }
+ dialog.SetExtendedMessage(extmsg);
+
+ switch ( dialog.ShowModal() )
+ {
+ case wxID_YES:
+ wxLogStatus(wxT("You pressed \"Yes\""));
+ break;
+
+ case wxID_NO:
+ wxLogStatus(wxT("You pressed \"No\""));
+ break;
+
+ case wxID_CANCEL:
+ wxLogStatus(wxT("You pressed \"Cancel\""));
+ break;
+
+ default:
+ wxLogError(wxT("Unexpected wxMessageDialog return code!"));
+ }
+}
+
+void MyFrame::MessageBoxWindowModal(wxCommandEvent& WXUNUSED(event))
+{
+ wxMessageDialog* dialog = new wxMessageDialog(this,
+ "This is a message box\n"
+ "This is a long, long string to test out if the message box "
+ "is laid out properly.",
+ "Message box text",
+ wxCENTER |
+ wxNO_DEFAULT | wxYES_NO | wxCANCEL |
+ wxICON_INFORMATION);
+
+ wxString extmsg;
+ if ( dialog->SetYesNoCancelLabels