#endif
);
- dialog.SetDirectory(wxGetHomeDir());
dialog.CentreOnParent();
+ dialog.SetDirectory(wxGetHomeDir());
if (dialog.ShowModal() == wxID_OK)
{
{
wxDialog dlg(this, wxID_ANY, _T("Dialog centered on screen"),
wxDefaultPosition, wxSize(200, 100));
- new wxButton(&dlg, wxID_OK, _T("Close"), wxPoint(10, 10));
+ (new wxButton(&dlg, wxID_OK, _T("Close")))->Centre();
dlg.CentreOnScreen();
dlg.ShowModal();
}
{
wxDialog dlg(this, wxID_ANY, _T("Dialog centered on parent"),
wxDefaultPosition, wxSize(200, 100));
- new wxButton(&dlg, wxID_OK, _T("Close"), wxPoint(10, 10));
+ (new wxButton(&dlg, wxID_OK, _T("Close")))->Centre();
dlg.CentreOnParent();
dlg.ShowModal();
}