undid accidental commit of this file in the last revision
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47801 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -183,31 +183,17 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
|||||||
Close(true);
|
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))
|
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
MyDialog dlg(this);
|
wxMessageBox(wxString::Format(
|
||||||
dlg.ShowModal();
|
_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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user