X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/39d663394811d826b78fc9ef2c553b852b341da9..befc36f88871cc7d5f116b9ffca6d669a6993ea2:/samples/minimal/minimal.cpp diff --git a/samples/minimal/minimal.cpp b/samples/minimal/minimal.cpp index 13c3aaeaa0..09ed8305c2 100644 --- a/samples/minimal/minimal.cpp +++ b/samples/minimal/minimal.cpp @@ -183,31 +183,17 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) Close(true); } -class MyDialog : public wxDialog -{ -public: - MyDialog(wxWindow *parent) - : wxDialog(parent, -1, wxString("Dialog")) - { - new wxButton(this, wxID_OK); - - Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED, - wxCommandEventHandler(MyDialog::OnOk)); - } - -private: - void OnOk(wxCommandEvent& event) - { - wxMessageDialog *dlg = new wxMessageDialog(this, "Message"); - dlg->ShowModal(); - dlg->Destroy(); - - event.Skip(); - } -}; - void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) { - MyDialog dlg(this); - dlg.ShowModal(); + wxMessageBox(wxString::Format( + _T("Welcome to %s!\n") + _T("\n") + _T("This is the minimal wxWidgets sample\n") + _T("running under %s."), + wxVERSION_STRING, + wxGetOsDescription().c_str() + ), + _T("About wxWidgets minimal sample"), + wxOK | wxICON_INFORMATION, + this); }