X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b014db05bb062ddacf19e22b4c638d8ac5429d95..3a3dde0d44c43bc70a1e9791381ada04b4953a5d:/src/msw/filedlg.cpp diff --git a/src/msw/filedlg.cpp b/src/msw/filedlg.cpp index 63e5f18dfd..e1c40bf3a5 100644 --- a/src/msw/filedlg.cpp +++ b/src/msw/filedlg.cpp @@ -276,13 +276,7 @@ int wxFileDialog::ShowModal() *fileNameBuffer = wxT('\0'); *titleBuffer = wxT('\0'); -#if WXWIN_COMPATIBILITY_2_4 - long msw_flags = 0; - if ( HasFdFlag(wxHIDE_READONLY) || HasFdFlag(wxFD_SAVE) ) - msw_flags |= OFN_HIDEREADONLY; -#else long msw_flags = OFN_HIDEREADONLY; -#endif if ( HasFdFlag(wxFD_FILE_MUST_EXIST) ) msw_flags |= OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST; @@ -397,7 +391,7 @@ int wxFileDialog::ShowModal() } } - of.lpstrFilter = (LPTSTR)filterBuffer.c_str(); + of.lpstrFilter = (LPTSTR)filterBuffer.wx_str(); of.nFilterIndex = m_filterIndex + 1; //=== Setting defaultFileName >>========================================= @@ -425,7 +419,7 @@ int wxFileDialog::ShowModal() defextBuffer = AppendExtension(wxT("a"), extension); if (defextBuffer.StartsWith(wxT("a."))) { - defextBuffer.Mid(2); + defextBuffer = defextBuffer.Mid(2); // remove "a." of.lpstrDefExt = defextBuffer.c_str(); } }