]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/filedlg.cpp
Fix memory leak by letting the base class version handle the
[wxWidgets.git] / src / msw / filedlg.cpp
index b8d7c947e5045230502f715327514157b11a8195..7adedb7f72033164a5d1be4db57991c903b68e6a 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     01/02/97
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
-// Licence:     wxWindows licence
+// Licence:     wxWidgets licence
 /////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
@@ -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;