Index: src/src/scriptingsettingsdlg.cpp
===================================================================
--- src/src/scriptingsettingsdlg.cpp	(revision 3395)
+++ src/src/scriptingsettingsdlg.cpp	(working copy)
@@ -242,7 +242,11 @@
                             XRCCTRL(*this, "txtScript", wxTextCtrl)->GetValue(),
                             XRCCTRL(*this, "txtScript", wxTextCtrl)->GetValue(),
                             FileFilters::GetFilterString(_T(".script")),
-                            wxOPEN | wxHIDE_READONLY);
+                            wxOPEN
+#if (WXWIN_COMPATIBILITY_2_4)
+                            | wxHIDE_READONLY
+#endif
+    );
     PlaceWindow(dlg);
     if (dlg->ShowModal() == wxID_OK)
     {
Index: src/sdk/scripting/bindings/sc_io.cpp
===================================================================
--- src/sdk/scripting/bindings/sc_io.cpp	(revision 3353)
+++ src/sdk/scripting/bindings/sc_io.cpp	(working copy)
@@ -66,7 +66,11 @@
                             wxEmptyString,
                             Manager::Get()->GetMacrosManager()->ReplaceMacros(defaultFile),
                             filter,
-                            wxOPEN | wxHIDE_READONLY);
+                            wxOPEN
+#if (WXWIN_COMPATIBILITY_2_4)
+                            | wxHIDE_READONLY
+#endif
+            );
             PlaceWindow(&dlg);
             if (dlg.ShowModal() == wxID_OK)
                 return dlg.GetPath();
Index: src/sdk/editpairdlg.cpp
===================================================================
--- src/sdk/editpairdlg.cpp	(revision 3353)
+++ src/sdk/editpairdlg.cpp	(working copy)
@@ -62,7 +62,11 @@
                             XRCCTRL(*this, "txtValue", wxTextCtrl)->GetValue(),
                             _T(""),
                             FileFilters::GetFilterAll(),
-                            wxOPEN | wxHIDE_READONLY);
+                            wxOPEN
+#if (WXWIN_COMPATIBILITY_2_4)
+                            | wxHIDE_READONLY
+#endif
+            );
             PlaceWindow(&dlg);
             if (dlg.ShowModal() == wxID_OK)
                 XRCCTRL(*this, "txtValue", wxTextCtrl)->SetValue(dlg.GetPath());
Index: src/sdk/selecttargetdlg.cpp
===================================================================
--- src/sdk/selecttargetdlg.cpp	(revision 3353)
+++ src/sdk/selecttargetdlg.cpp	(working copy)
@@ -119,7 +119,11 @@
                             #else
                             _("All files (*)|*"),
                             #endif
-                            wxOPEN | wxFILE_MUST_EXIST | wxHIDE_READONLY);
+                            wxOPEN | wxFILE_MUST_EXIST
+#if (WXWIN_COMPATIBILITY_2_4)
+                            | wxHIDE_READONLY
+#endif
+        );
         dlg->SetFilterIndex(0);
         PlaceWindow(dlg);
         if (dlg->ShowModal() != wxID_OK)
Index: src/sdk/editarrayfiledlg.cpp
===================================================================
--- src/sdk/editarrayfiledlg.cpp	(revision 3353)
+++ src/sdk/editarrayfiledlg.cpp	(working copy)
@@ -84,7 +84,11 @@
                     m_BasePath,
                     _T(""),
                     FileFilters::GetFilterAll(),
-                    wxOPEN | wxHIDE_READONLY);
+                    wxOPEN
+#if (WXWIN_COMPATIBILITY_2_4)
+                    | wxHIDE_READONLY
+#endif
+    );
 
     PlaceWindow(&dlg);
     if (dlg.ShowModal() != wxID_OK)
@@ -104,7 +108,11 @@
                     m_BasePath,
                     list->GetStringSelection(),
                     FileFilters::GetFilterAll(),
-                    wxOPEN | wxHIDE_READONLY);
+                    wxOPEN
+#if (WXWIN_COMPATIBILITY_2_4)
+                    | wxHIDE_READONLY
+#endif
+    );
 
     PlaceWindow(&dlg);
     if (dlg.ShowModal() != wxID_OK)
Index: src/sdk/projectmanager.cpp
===================================================================
--- src/sdk/projectmanager.cpp	(revision 3353)
+++ src/sdk/projectmanager.cpp	(working copy)
@@ -1875,7 +1875,12 @@
                     prj->GetBasePath(),
                     wxEmptyString,
                     FileFilters::GetFilterString(),
-                    wxOPEN | wxMULTIPLE | wxFILE_MUST_EXIST | wxHIDE_READONLY);
+                    wxOPEN | wxMULTIPLE | wxFILE_MUST_EXIST
+#if (WXWIN_COMPATIBILITY_2_4)
+                    | wxHIDE_READONLY
+#endif
+    );
+
     dlg.SetFilterIndex(FileFilters::GetIndexForFilterAll());
 
     PlaceWindow(&dlg);
Index: src/sdk/projectoptionsdlg.cpp
===================================================================
--- src/sdk/projectoptionsdlg.cpp	(revision 3353)
+++ src/sdk/projectoptionsdlg.cpp	(working copy)
@@ -852,7 +852,11 @@
                     fname.GetPath(),
                     fname.GetFullName(),
                     _("Script files (*.script)|*.script"),
-                    wxOPEN | wxMULTIPLE | wxHIDE_READONLY);
+                    wxOPEN | wxMULTIPLE
+#if (WXWIN_COMPATIBILITY_2_4)
+                    | wxHIDE_READONLY
+#endif
+    );
 
     PlaceWindow(&dlg);
     if (dlg.ShowModal() != wxID_OK)
Index: src/plugins/contrib/profiler/cbprofiler.cpp
===================================================================
--- src/plugins/contrib/profiler/cbprofiler.cpp	(revision 3353)
+++ src/plugins/contrib/profiler/cbprofiler.cpp	(working copy)
@@ -189,7 +189,11 @@
                 else
                 {
                     wxFileDialog filedialog(Manager::Get()->GetAppWindow(), _("Locate profile information"),
-                                            _T(""),_T("gmon.out"),_T("*.*"),wxOPEN|wxFILE_MUST_EXIST|wxHIDE_READONLY);
+                                            _T(""),_T("gmon.out"),_T("*.*"),wxOPEN|wxFILE_MUST_EXIST
+#if (WXWIN_COMPATIBILITY_2_4)
+                                            | wxHIDE_READONLY
+#endif
+                    );
                     if (filedialog.ShowModal() == wxID_OK)
                     {
                         dataname = filedialog.GetPath();
Index: src/plugins/contrib/symtab/symtabconfig.cpp
===================================================================
--- src/plugins/contrib/symtab/symtabconfig.cpp	(revision 3353)
+++ src/plugins/contrib/symtab/symtabconfig.cpp	(working copy)
@@ -198,7 +198,11 @@
 #endif
   wxString es       = wxEmptyString;
 
-  wxFileDialog fd(parent, caption, es, es, wildcard, wxOPEN|wxHIDE_READONLY);
+  wxFileDialog fd(parent, caption, es, es, wildcard, wxOPEN
+#if (WXWIN_COMPATIBILITY_2_4)
+                  | wxHIDE_READONLY
+#endif
+  );
   if (fd.ShowModal() == wxID_OK)
   {
     wxString path = fd.GetPath();
@@ -223,7 +227,11 @@
 #endif
   wxString es       = wxEmptyString;
 
-  wxFileDialog fd(parent, caption, es, es, wildcard, wxOPEN|wxHIDE_READONLY);
+  wxFileDialog fd(parent, caption, es, es, wildcard, wxOPEN
+#if (WXWIN_COMPATIBILITY_2_4)
+                    | wxHIDE_READONLY
+#endif
+  );
   if (fd.ShowModal() == wxID_OK)
   {
     wxString path = fd.GetPath();
Index: src/plugins/contrib/wxSmith/wxsprojectconfigurationdlg.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxsprojectconfigurationdlg.cpp	(revision 3353)
+++ src/plugins/contrib/wxSmith/wxsprojectconfigurationdlg.cpp	(working copy)
@@ -94,7 +94,11 @@
                 _T(""), _T("main.cpp"), _T("cpp"),
                 _("C++ source files (*.cpp)|*.cpp|"
                   "All files (*)|*"),
-                wxOPEN|wxFILE_MUST_EXIST|wxHIDE_READONLY);
+                wxOPEN|wxFILE_MUST_EXIST
+#if (WXWIN_COMPATIBILITY_2_4)
+                | wxHIDE_READONLY
+#endif
+            );
             if ( NewFileName.empty() )
             {
                 EndModal(1);
@@ -176,7 +180,11 @@
         _("XRC files (*.xrc)|*.xrc|"
           "Zipped files (*.zip)|*.zip|"
           "All files (*)|*"),
-        wxOPEN|wxFILE_MUST_EXIST|wxHIDE_READONLY);
+        wxOPEN|wxFILE_MUST_EXIST
+#if (WXWIN_COMPATIBILITY_2_4)
+        | wxHIDE_READONLY
+#endif
+    );
 
     if ( !FileName.empty() )
     {
Index: src/plugins/contrib/wxSmith/wxsmith.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxsmith.cpp	(revision 3353)
+++ src/plugins/contrib/wxSmith/wxsmith.cpp	(working copy)
@@ -341,7 +341,11 @@
         _T(""),
         _T("xrc"),
         _("XRC files (*.xrc)|*.xrc"),
-        wxOPEN|wxFILE_MUST_EXIST|wxHIDE_READONLY);
+        wxOPEN|wxFILE_MUST_EXIST
+#if (WXWIN_COMPATIBILITY_2_4)
+        | wxHIDE_READONLY
+#endif
+    );
 
     if ( FileName.empty() ) return;
 
Index: src/plugins/debuggergdb/debuggergdb.cpp
===================================================================
--- src/plugins/debuggergdb/debuggergdb.cpp	(revision 3353)
+++ src/plugins/debuggergdb/debuggergdb.cpp	(working copy)
@@ -1662,7 +1662,11 @@
                                     _T(""),
                                     _T(""),
                                     _("Executables and libraries|*.exe;*.dll"),
-                                    wxOPEN | wxFILE_MUST_EXIST | wxHIDE_READONLY);
+                                    wxOPEN | wxFILE_MUST_EXIST
+#if (WXWIN_COMPATIBILITY_2_4)
+                                    | wxHIDE_READONLY
+#endif
+    );
     if (file.IsEmpty())
         return;
 //    Manager::Get()->GetMessageManager()->Log(m_PageIndex, _("Adding symbol file: %s"), file.c_str());
Index: src/plugins/debuggergdb/debuggertree.cpp
===================================================================
--- src/plugins/debuggergdb/debuggertree.cpp	(revision 3353)
+++ src/plugins/debuggergdb/debuggertree.cpp	(working copy)
@@ -633,7 +633,11 @@
                     _T(""),
                     _T(""),
                     _T("Watch files (*.watch)|*.watch|Any file (*)|*"),
-                    wxOPEN | wxFILE_MUST_EXIST | wxCHANGE_DIR | wxHIDE_READONLY);
+                    wxOPEN | wxFILE_MUST_EXIST | wxCHANGE_DIR
+#if (WXWIN_COMPATIBILITY_2_4)
+                    | wxHIDE_READONLY
+#endif
+    );
     PlaceWindow(&dlg);
     if (dlg.ShowModal() != wxID_OK)
         return;
Index: src/plugins/compilergcc/compileroptionsdlg.cpp
===================================================================
--- src/plugins/compilergcc/compileroptionsdlg.cpp	(revision 3353)
+++ src/plugins/compilergcc/compileroptionsdlg.cpp	(working copy)
@@ -1933,7 +1933,11 @@
                             #else
                             _("All files (*)|*"),
                             #endif
-                            wxOPEN | wxFILE_MUST_EXIST | wxHIDE_READONLY);
+                            wxOPEN | wxFILE_MUST_EXIST
+#if (WXWIN_COMPATIBILITY_2_4)
+                            | wxHIDE_READONLY
+#endif
+    );
     dlg->SetFilterIndex(0);
 
     PlaceWindow(dlg);
Index: src/plugins/defaultmimehandler/editmimetypesdlg.cpp
===================================================================
--- src/plugins/defaultmimehandler/editmimetypesdlg.cpp	(revision 3353)
+++ src/plugins/defaultmimehandler/editmimetypesdlg.cpp	(working copy)
@@ -165,7 +165,11 @@
                             wxEmptyString,
                             XRCCTRL(*this, "txtProgram", wxTextCtrl)->GetValue(),
                             FileFilters::GetFilterAll(),
-                            wxOPEN | wxHIDE_READONLY);
+                            wxOPEN
+#if (WXWIN_COMPATIBILITY_2_4)
+                            | wxHIDE_READONLY
+#endif
+    );
     PlaceWindow(dlg);
     if (dlg->ShowModal() == wxID_OK)
         XRCCTRL(*this, "txtProgram", wxTextCtrl)->SetValue(dlg->GetPath());
Index: src/plugins/defaultmimehandler/defaultmimehandler.cpp
===================================================================
--- src/plugins/defaultmimehandler/defaultmimehandler.cpp	(revision 3353)
+++ src/plugins/defaultmimehandler/defaultmimehandler.cpp	(working copy)
@@ -236,7 +236,11 @@
                             wxEmptyString,
                             wxEmptyString,
                             FileFilters::GetFilterAll(),
-                            wxOPEN | wxHIDE_READONLY);
+                            wxOPEN
+#if (WXWIN_COMPATIBILITY_2_4)
+                            | wxHIDE_READONLY
+#endif
+    );
     PlaceWindow(dlg);
     if (dlg->ShowModal() == wxID_OK)
         return dlg->GetPath();
Index: src/src/main.cpp
===================================================================
--- src/src/main.cpp	(revision 3353)
+++ src/src/main.cpp	(working copy)
@@ -1261,7 +1261,11 @@
                             wxEmptyString,
                             wxEmptyString,
                             filter,
-                            wxOPEN | wxHIDE_READONLY);
+                            wxOPEN
+#if (WXWIN_COMPATIBILITY_2_4)
+                    | wxHIDE_READONLY
+#endif
+    );
     wxString sel;
     PlaceWindow(dlg);
     if (dlg->ShowModal() == wxID_OK)
@@ -2097,7 +2101,11 @@
                             Path,
                             wxEmptyString,
                             Filters,
-                            wxOPEN | wxMULTIPLE | wxHIDE_READONLY);
+                            wxOPEN | wxMULTIPLE
+#if (WXWIN_COMPATIBILITY_2_4)
+                            | wxHIDE_READONLY
+#endif
+    );
     dlg->SetFilterIndex(StoredIndex);
 
     PlaceWindow(dlg);
Index: src/src/scriptconsole.cpp
===================================================================
--- src/src/scriptconsole.cpp	(revision 3353)
+++ src/src/scriptconsole.cpp	(working copy)
@@ -128,7 +128,11 @@
                             path,
                             wxEmptyString,
                             _T("Script files (*.script)|*.script"),
-                            wxOPEN | wxHIDE_READONLY);
+                            wxOPEN
+#if (WXWIN_COMPATIBILITY_2_4)
+                            | wxHIDE_READONLY
+#endif
+    );
     if (dlg->ShowModal() == wxID_OK)
     {
         mgr->Write(_T("/file_dialogs/file_run_script/directory"), dlg->GetDirectory());
Index: src/tools/cb_share_config/mainframe.cpp
===================================================================
--- src/tools/cb_share_config/mainframe.cpp	(revision 3353)
+++ src/tools/cb_share_config/mainframe.cpp	(working copy)
@@ -250,7 +250,10 @@
     wxT("*.conf"),                                   // default extension
     wxT("Code::Blocks configuration files (*.conf)|*.conf|"
         "All files (*.*)|*.*"),                      // wildcards
-    wxOPEN | wxFILE_MUST_EXIST | wxHIDE_READONLY     // flags
+    wxOPEN | wxFILE_MUST_EXIST
+#if (WXWIN_COMPATIBILITY_2_4)
+    | wxHIDE_READONLY
+#endif
   );
 
   return filename;
