]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/mimetype.cpp
added missing selstore.cpp
[wxWidgets.git] / src / msw / mimetype.cpp
index 1d504dd9747b91dfbfd93c5ca6710abbb7d1158d..6f488946c587ddfc4528c1782709b25688188f7e 100644 (file)
@@ -336,7 +336,8 @@ bool wxFileTypeImpl::GetMimeTypes(wxArrayString& mimeTypes) const
 
 bool wxFileTypeImpl::GetIcon(wxIcon *icon,
                              wxString *iconFile,
-                             int *iconIndex) const
+                             int *iconIndex,
+                             int iconSize) const
 {
 #if wxUSE_GUI
     wxString strIconKey;
@@ -366,16 +367,13 @@ bool wxFileTypeImpl::GetIcon(wxIcon *icon,
             wxString strExpPath = wxExpandEnvVars(strFullPath);
             // here we need C based counting!
             int nIndex = wxAtoi(strIndex);
-#ifdef __DIGITALMARS__
-//FIXME __DIGITALMARS__ April 2003 CE
-    // why no ExtractIcon in library
-            wxLogTrace(_T("wxFileTypeImpl::GetIcon"),
-                   _T("Returning false from wxFileTypeImpl::GetIcon because of DigitalMars compiler bug"));
-            HICON hIcon = 0 ;
-#else
-
-            HICON hIcon = ExtractIcon(GetModuleHandle(NULL), strExpPath, nIndex);
-#endif
+
+            HICON hIcon, hIconLarge, hIconSmall;
+            ExtractIconEx(strExpPath, nIndex, &hIconLarge, &hIconSmall, 1);
+
+            hIcon = (iconSize == wxICON_LARGE) ? hIconLarge : hIconSmall;
+
+
             switch ( (int)hIcon ) {
                 case 0: // means no icons were found
                 case 1: // means no such file or it wasn't a DLL/EXE/OCX/ICO/...