]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/dialogs/dialogs.cpp
correct access for virtuals
[wxWidgets.git] / samples / dialogs / dialogs.cpp
index f0cc421f00aa53e4f984c744f886fdc1de5c6e56..13a84b1546fe065e6264a27b2d896fbe639dfa44 100644 (file)
@@ -696,8 +696,8 @@ void MyFrame::FileOpen(wxCommandEvent& WXUNUSED(event) )
 #endif
                  );
 
-    dialog.SetDirectory(wxGetHomeDir());
     dialog.CentreOnParent();
+    dialog.SetDirectory(wxGetHomeDir());
 
     if (dialog.ShowModal() == wxID_OK)
     {
@@ -968,7 +968,7 @@ void MyFrame::DlgCenteredScreen(wxCommandEvent& WXUNUSED(event))
 {
     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();
 }
@@ -977,7 +977,7 @@ void MyFrame::DlgCenteredParent(wxCommandEvent& WXUNUSED(event))
 {
     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();
 }
@@ -1460,7 +1460,7 @@ SettingsDialog::SettingsDialog(wxWindow* win, int dialogType)
         m_imageList = NULL;
 
     Create(win, wxID_ANY, _("Preferences"), wxDefaultPosition, wxDefaultSize,
-        wxDEFAULT_DIALOG_STYLE| (int)wxPlatform().IsNot(wxWinCE, resizeBorder)
+        wxDEFAULT_DIALOG_STYLE| (int)wxPlatform::IfNot(wxWinCE, resizeBorder)
 /*
 #ifndef __WXWINCE__
         |resizeBorder
@@ -1470,7 +1470,7 @@ SettingsDialog::SettingsDialog(wxWindow* win, int dialogType)
 
     // If using a toolbook, also follow Mac style and don't create buttons
     if (!useToolBook)
-        CreateButtons(wxOK|wxCANCEL| (int)wxPlatform().IsNot(wxWinPocketPC, wxHELP)
+        CreateButtons(wxOK|wxCANCEL| (int)wxPlatform::IfNot(wxWinPocketPC, wxHELP)
 /*
 #ifndef __POCKETPC__
                       |wxHELP