]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/volume.cpp
fixed creation of the dialogs with a simple (non 3D, non resizeable) border; also...
[wxWidgets.git] / src / msw / volume.cpp
index 378c3fff1b638309a7d905599f5bd05701abb298..ac38c7d4abeeec34ae8a40d71963dccde441af8a 100644 (file)
     #pragma hdrstop
 #endif
 
+#if wxUSE_FSVOLUME
+
 #ifndef WX_PRECOMP
-#include <wx/icon.h>
-#include <wx/intl.h>
+    #include "wx/icon.h"
+    #include "wx/intl.h"
 #endif // WX_PRECOMP
 
 #include "wx/dir.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.
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -74,7 +108,9 @@ static FileInfoMap s_fileInfo(25);
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 // Other initialization.
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+#if wxUSE_GUI
 WX_DEFINE_OBJARRAY(wxIconArray);
+#endif
 
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 // Local helper functions.
@@ -475,7 +511,7 @@ bool wxFSVolume::Create(const wxString& name)
     }
     m_dispName = fi.szDisplayName;
 
-#ifdef wxUSE_GUI
+#if wxUSE_GUI
 
     m_icons.Alloc(wxFS_VOL_ICO_MAX);
     int idx;
@@ -533,7 +569,7 @@ int wxFSVolume::GetFlags() const
     return itr->second.m_flags;
 } // GetFlags
 
-#ifdef wxUSE_GUI
+#if wxUSE_GUI
 
 //=============================================================================
 // Function: GetIcon
@@ -586,3 +622,5 @@ wxIcon wxFSVolume::GetIcon(wxFSIconType type) const
 
 #endif // wxUSE_GUI
 
+#endif // wxUSE_FSVOLUME
+