1 // SysIconUtils.h 2 3 #ifndef ZIP7_INC_SYS_ICON_UTILS_H 4 #define ZIP7_INC_SYS_ICON_UTILS_H 5 6 #include "../../../Common/MyWindows.h" 7 8 #include <CommCtrl.h> 9 10 #include "../../../Common/MyString.h" 11 12 struct CExtIconPair 13 { 14 UString Ext; 15 int IconIndex; 16 // UString TypeName; 17 18 // int Compare(const CExtIconPair &a) const { return MyStringCompareNoCase(Ext, a.Ext); } 19 }; 20 21 struct CAttribIconPair 22 { 23 DWORD Attrib; 24 int IconIndex; 25 // UString TypeName; 26 27 // int Compare(const CAttribIconPair &a) const { return Ext.Compare(a.Ext); } 28 }; 29 30 class CExtToIconMap 31 { 32 public: 33 CRecordVector<CAttribIconPair> _attribMap; 34 CObjectVector<CExtIconPair> _extMap; 35 int SplitIconIndex; 36 int SplitIconIndex_Defined; 37 CExtToIconMap()38 CExtToIconMap(): SplitIconIndex_Defined(false) {} 39 Clear()40 void Clear() 41 { 42 SplitIconIndex_Defined = false; 43 _extMap.Clear(); 44 _attribMap.Clear(); 45 } 46 int GetIconIndex(DWORD attrib, const wchar_t *fileName /* , UString *typeName */); 47 // int GetIconIndex(DWORD attrib, const UString &fileName); 48 }; 49 50 DWORD_PTR GetRealIconIndex(CFSTR path, DWORD attrib, int &iconIndex); 51 int GetIconIndexForCSIDL(int csidl); 52 53 HIMAGELIST GetSysImageList(bool smallIcons); 54 55 #endif 56