- wxBox *buttonsizer = new wxBox( wxHORIZONTAL );
-
- wxButton *ok = (wxButton *) NULL;
-// if (style & wxOK)
- {
- ok = new wxButton( this, wxID_OK, _("OK") );
- buttonsizer->Add( ok, 0, wxLEFT|wxRIGHT, 10 );
- }
-
- wxButton *cancel = (wxButton *) NULL;
-// if (style & wxCANCEL)
- {
- cancel = new wxButton( this, wxID_CANCEL, _("Cancel") );
- buttonsizer->Add( cancel, 0, wxLEFT|wxRIGHT, 10 );
- }
-
- topsizer->Add( buttonsizer, 0, wxCENTRE | wxALL, 10 );
+ topsizer->Add( CreateButtonSizer( wxOK|wxCANCEL ), 0, wxCENTRE | wxALL, 10 );