X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ac95e6714050a7bf7d0c2b7fbc233443bb03922f..fdec2c055413ed1b39bd2df9979c6c04aa94fe28:/src/msw/filedlg.cpp diff --git a/src/msw/filedlg.cpp b/src/msw/filedlg.cpp index 8677731279..775affb082 100644 --- a/src/msw/filedlg.cpp +++ b/src/msw/filedlg.cpp @@ -28,7 +28,7 @@ #pragma hdrstop #endif -#if wxUSE_FILEDLG && !wxUSE_SMARTPHONE +#if wxUSE_FILEDLG && !defined(__SMARTPHONE__) #ifndef WX_PRECOMP #include "wx/utils.h" @@ -139,9 +139,14 @@ int wxFileDialog::ShowModal() *fileNameBuffer = wxT('\0'); *titleBuffer = wxT('\0'); +#if WXWIN_COMPATIBILITY_2_4 long msw_flags = 0; if ( (m_dialogStyle & wxHIDE_READONLY) || (m_dialogStyle & wxSAVE) ) msw_flags |= OFN_HIDEREADONLY; +#else + long msw_flags = OFN_HIDEREADONLY; +#endif + if ( m_dialogStyle & wxFILE_MUST_EXIST ) msw_flags |= OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST; @@ -340,6 +345,7 @@ int wxFileDialog::ShowModal() dir += _T('\\'); m_path = dir + m_fileName; + m_filterIndex = (int)of.nFilterIndex - 1; } else {