]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/filedlg.cpp
fixed wxGetKeyState to get current status of non-togle keys, and to
[wxWidgets.git] / src / msw / filedlg.cpp
index 8677731279a52075f4b0e85ba48924241dbb7cd2..775affb082c6da05a04ae43f481bb52af54a20ef 100644 (file)
@@ -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
         {