- topsizer->Add( CreateButtonSizer( style ), 0, wxCENTRE | wxALL, 10 );
+ int center_flag = wxEXPAND;
+ if (style & wxYES_NO) center_flag = wxALIGN_CENTRE;
+ topsizer->Add( CreateButtonSizer( style & (wxOK|wxCANCEL|wxYES_NO|wxYES_DEFAULT|wxNO_DEFAULT) ),
+ 0, center_flag | wxALL, 10 );