X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4aebbc599eef4270d7e8bc8ce40e6ac30baafdb4..adb45366da2cb1ee72f548ab2fa149f071327682:/src/msw/volume.cpp diff --git a/src/msw/volume.cpp b/src/msw/volume.cpp index df62ac3e97..6f4ada640d 100644 --- a/src/msw/volume.cpp +++ b/src/msw/volume.cpp @@ -41,8 +41,15 @@ #include "wx/volume.h" -// Win32 headers -#include +#include + +#ifndef SHGetFileInfo +#ifdef UNICODE +#define SHGetFileInfo SHGetFileInfoW +#else +#define SHGetFileInfo SHGetFileInfoA +#endif +#endif #ifndef SHGFI_ATTRIBUTES #define SHGFI_ATTRIBUTES 2048 @@ -99,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; }; @@ -109,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 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -405,7 +422,7 @@ wxArrayString wxFSVolume::GetVolumes(int flagsSet, int flagsUnset) { #ifdef UNICODE s_pWNetOpenEnum = (WNetOpenEnumPtr)s_mprLib.GetSymbol(_T("WNetOpenEnumW")); - s_pWNetEnumResource = (WNetEnumResourcePtr)s_mprLib.GetSymbol("WNetEnumResourceW"); + s_pWNetEnumResource = (WNetEnumResourcePtr)s_mprLib.GetSymbol(_T("WNetEnumResourceW")); #else s_pWNetOpenEnum = (WNetOpenEnumPtr)s_mprLib.GetSymbol(_T("WNetOpenEnumA")); s_pWNetEnumResource = (WNetEnumResourcePtr)s_mprLib.GetSymbol(_T("WNetEnumResourceA"));