]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/volume.cpp
Compile fix for the iPaq. No idea why.
[wxWidgets.git] / src / msw / volume.cpp
index 2c04d2952fba2d7e3e02dfca302781a07e2b5bda..e1b4db737d8169b32e8fa262314379f22deaac94 100644 (file)
 
 #include "wx/volume.h"
 
-// Win32 headers
-#include <shlobj.h>
+#include <shellapi.h>
+
+#ifndef SHGetFileInfo
+#ifdef UNICODE
+#define SHGetFileInfo SHGetFileInfoW
+#else
+#define SHGetFileInfo SHGetFileInfoA
+#endif
+#endif
 
 #ifndef SHGFI_ATTRIBUTES
     #define SHGFI_ATTRIBUTES 2048
      #define SHGFI_SMALLICON 1
 #endif
 
+#ifndef SHGFI_SHELLICONSIZE
+    #define SHGFI_SHELLICONSIZE 4
+#endif
+
+#ifndef SHGFI_OPENICON
+    #define SHGFI_OPENICON 2
+#endif
+
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 // Dynamic library function defs.
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -91,6 +106,15 @@ struct FileInfo : public wxObject
 {
     FileInfo(unsigned flag=0, wxFSVolumeKind type=wxFS_VOL_OTHER) :
         m_flags(flag), m_type(type) {}
+
+    FileInfo(const FileInfo& other) { *this = other; }
+    FileInfo& operator=(const FileInfo& other)
+    {
+        m_flags = other.m_flags;
+        m_type = other.m_type;
+        return *this;
+    }
+
     unsigned m_flags;
     wxFSVolumeKind m_type;
 };
@@ -101,7 +125,8 @@ static FileInfoMap s_fileInfo(25);
 // Other initialization.
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 #if wxUSE_GUI
-WX_DEFINE_OBJARRAY(wxIconArray);
+// already in wx/iconbndl.h
+// WX_DEFINE_OBJARRAY(wxIconArray);
 #endif
 
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -247,8 +272,8 @@ static void BuildListFromNN(wxArrayString& list, NETRESOURCE* pResSrc,
     //----------------------------------------------------------------------
     if (rc = s_pWNetOpenEnum(scope, RESOURCETYPE_DISK, 0, pResSrc, &hEnum), rc == NO_ERROR)
     {
-        unsigned long count = 1;
-        unsigned long size = 256;
+        DWORD count = 1;
+        DWORD size = 256;
         NETRESOURCE* pRes = (NETRESOURCE*)malloc(size);
         memset(pRes, 0, sizeof(NETRESOURCE));
         while (rc = s_pWNetEnumResource(hEnum, &count, pRes, &size), rc == NO_ERROR || rc == ERROR_MORE_DATA)