]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/filedlg.cpp
don't use wxString::FromASCII() with possibly non-ASCII strings (fixes asserts when...
[wxWidgets.git] / src / msw / filedlg.cpp
index 546b6c7ab05f48d5e92a600cf9b5e7ab06fa9f3d..0cc25b19d6a77f1aba06954f35e0ed158cba216a 100644 (file)
@@ -167,7 +167,7 @@ void wxFileDialog::GetFilenames(wxArrayString& files) const
 void wxFileDialog::SetPath(const wxString& path)
 {
     wxString ext;
-    wxSplitPath(path, &m_dir, &m_fileName, &ext);
+    wxFileName::SplitPath(path, &m_dir, &m_fileName, &ext);
     if ( !ext.empty() )
         m_fileName << _T('.') << ext;
 }
@@ -494,7 +494,7 @@ int wxFileDialog::ShowModal()
 
     //=== Setting defaultFileName >>=========================================
 
-    wxStrlcpy(fileNameBuffer, m_fileName, WXSIZEOF(fileNameBuffer));
+    wxStrlcpy(fileNameBuffer, m_fileName.c_str(), WXSIZEOF(fileNameBuffer));
 
     of.lpstrFile = fileNameBuffer;  // holds returned filename
     of.nMaxFile  = wxMAXPATH;