}
wxBoxSizer *buts = new wxBoxSizer(wxHORIZONTAL);
- wxButton *okButton = new wxButton(this, 1003, _T("Ok"),wxDefaultPosition, wxSize(70, 30));
- wxButton *closeButton = new wxButton(this, 1004, _T("Close"), wxDefaultPosition, wxSize(70, 30));
+ wxButton *okButton = new wxButton(this, -1, _T("Ok"),wxDefaultPosition, wxSize(70, 30));
+ wxButton *closeButton = new wxButton(this, -1, _T("Close"), wxDefaultPosition, wxSize(70, 30));
// connect command event handlers
- Connect(1003,wxEVT_COMMAND_BUTTON_CLICKED,wxCommandEventHandler(wxBlackBoxEditionDialog::onClickOk));
- Connect(1004,wxEVT_COMMAND_BUTTON_CLICKED,wxCommandEventHandler(wxBlackBoxEditionDialog::onClickClose));
+ Connect(okButton->GetId(),wxEVT_COMMAND_BUTTON_CLICKED,wxCommandEventHandler(wxBlackBoxEditionDialog::onClickOk));
+ Connect(closeButton->GetId(),wxEVT_COMMAND_BUTTON_CLICKED,wxCommandEventHandler(wxBlackBoxEditionDialog::onClickClose));
buts->Add(okButton,0,wxCENTRE|wxEXPAND,5);
buts->Add(closeButton,0,wxCENTRE|wxEXPAND,5);