-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();
- }
-};
-