]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/dialogs/dialogs.cpp
Added "const" to the (char *) type params that should have been const params
[wxWidgets.git] / samples / dialogs / dialogs.cpp
index bec8295d8b35b0f39f4e3037f7f48e18af843b30..06adc34fb2995d19f3080bb751f6cd235a04f163 100644 (file)
@@ -56,7 +56,7 @@ bool MyApp::OnInit(void)
   m_canvasFont = *wxNORMAL_FONT;
 
   // Create the main frame window
-  MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "wxWindows dialogs example", wxPoint(50, 50), wxSize(400, 300));
+  MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "wxWindows dialogs example", wxPoint(20, 20), wxSize(400, 300));
 
   // Make a menubar
   wxMenu *file_menu = new wxMenu;
@@ -286,7 +286,11 @@ void MyFrame::FileSave(wxCommandEvent& WXUNUSED(event) )
 
 void MyFrame::DirChoose(wxCommandEvent& WXUNUSED(event) )
 {
-    wxDirDialog dialog(this, "Testing directory picker", "");
+    // pass some initial dir to wxDirDialog
+    wxString dirHome;
+    wxGetHomeDir(&dirHome);
+
+    wxDirDialog dialog(this, "Testing directory picker", dirHome);
 
     if (dialog.ShowModal() == wxID_OK)
     {