]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/volume.cpp
added wxCURSOR_RIGHT_ARROW to wxMGL
[wxWidgets.git] / src / msw / volume.cpp
index 4812244e485cbffc6634b73c85f5da34e805d4e0..df62ac3e97cdde6467e41e67c52cbf0bd41b4234 100644 (file)
 // Win32 headers
 #include <shlobj.h>
 
 // Win32 headers
 #include <shlobj.h>
 
+#ifndef SHGFI_ATTRIBUTES
+    #define SHGFI_ATTRIBUTES 2048
+#endif
+
+#ifndef SFGAO_READONLY
+    #define SFGAO_READONLY 0x00040000L
+#endif
+
+#ifndef SFGAO_REMOVABLE
+    #define SFGAO_REMOVABLE 0x02000000L
+#endif
+
+#ifndef SHGFI_DISPLAYNAME
+    #define SHGFI_DISPLAYNAME 512
+#endif
+
+#ifndef SHGFI_ICON
+    #define SHGFI_ICON 256
+#endif
+
+#ifndef SHGFI_SMALLICON
+     #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.
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 // Dynamic library function defs.
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -76,7 +108,9 @@ static FileInfoMap s_fileInfo(25);
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 // Other initialization.
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 // Other initialization.
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+#if wxUSE_GUI
 WX_DEFINE_OBJARRAY(wxIconArray);
 WX_DEFINE_OBJARRAY(wxIconArray);
+#endif
 
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 // Local helper functions.
 
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 // Local helper functions.
@@ -221,8 +255,8 @@ static void BuildListFromNN(wxArrayString& list, NETRESOURCE* pResSrc,
     //----------------------------------------------------------------------
     if (rc = s_pWNetOpenEnum(scope, RESOURCETYPE_DISK, 0, pResSrc, &hEnum), rc == NO_ERROR)
     {
     //----------------------------------------------------------------------
     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)
         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)
@@ -477,7 +511,7 @@ bool wxFSVolume::Create(const wxString& name)
     }
     m_dispName = fi.szDisplayName;
 
     }
     m_dispName = fi.szDisplayName;
 
-#ifdef wxUSE_GUI
+#if wxUSE_GUI
 
     m_icons.Alloc(wxFS_VOL_ICO_MAX);
     int idx;
 
     m_icons.Alloc(wxFS_VOL_ICO_MAX);
     int idx;
@@ -535,7 +569,7 @@ int wxFSVolume::GetFlags() const
     return itr->second.m_flags;
 } // GetFlags
 
     return itr->second.m_flags;
 } // GetFlags
 
-#ifdef wxUSE_GUI
+#if wxUSE_GUI
 
 //=============================================================================
 // Function: GetIcon
 
 //=============================================================================
 // Function: GetIcon