::wxMessageBox

int wxMessageBox(char *message, char *caption = "Message", int type = wxOK, wxFrame *parent = NULL, int x = -1, int y = -1, Bool centre = TRUE)

General purpose message dialog. type may be one or more of the following identifiers or'ed together: wxYES_NO, wxCANCEL, wxOK.

The return value is one of: wxYES, wxNO, wxCANCEL, wxOK.

For example:

  ...
  int answer = wxMessageBox("Quit program?", "Confirm",
                            wxYES_NO | wxCANCEL, main_frame);
  if (answer == wxYES)
    delete main_frame;
  ...
message may contain newline characters, in which case the message will be split into separate lines and centred in the dialog box, to cater for large messages.

If centre is TRUE, the message text is centred; if FALSE, the message is left-justified.