]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/stdpaths.cpp
fixed bug due to missing break in GetColourFromGTKWidget() (part of patch 1160117)
[wxWidgets.git] / src / msw / stdpaths.cpp
index d0271fe1e7a85ac2d6c88237884378d2d90fa2b4..707c30e38341a92e4cb91a387ace6c9b0be411df 100644 (file)
@@ -24,6 +24,8 @@
     #pragma hdrstop
 #endif
 
+#if wxUSE_STDPATHS
+
 #ifndef WX_PRECOMP
     #include "wx/app.h"
 #endif //WX_PRECOMP
@@ -244,7 +246,9 @@ wxString wxStandardPaths::GetUserConfigDir() const
 
 wxString wxStandardPaths::GetDataDir() const
 {
-    return AppendAppName(DoGetDirectory(CSIDL_PROGRAM_FILES));
+    // under Windows each program is usually installed in its own directory and
+    // so its datafiles are in the same directory as its main executable
+    return wxFileName(wxGetFullModuleName()).GetPath();
 }
 
 wxString wxStandardPaths::GetUserDataDir() const
@@ -292,3 +296,4 @@ wxString wxStandardPathsWin16::GetUserConfigDir() const
     return wxGetHomeDir();
 }
 
+#endif // wxUSE_STDPATHS