]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/icon.cpp
Changed name to wxFIXED_MINSIZE since that is more descriptive of what
[wxWidgets.git] / src / msw / icon.cpp
index c0070fc7131022832a307ba28e8bd97cd7866df9..9064101a533de02749fcbe0c99db24f9b51630f9 100644 (file)
@@ -17,7 +17,7 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
     #pragma implementation "icon.h"
 #endif
 
@@ -85,6 +85,19 @@ wxIcon::wxIcon(const wxString& iconfile,
     LoadFile(iconfile, flags, desiredWidth, desiredHeight);
 }
 
+wxIcon::wxIcon(const wxIconLocation& loc)
+{
+    // wxICOFileHandler accepts names in the format "filename;index"
+    wxString fullname = loc.GetFileName();
+    if ( loc.GetIndex() )
+    {
+        fullname << _T(';') << loc.GetIndex();
+    }
+    //else: 0 is default
+
+    LoadFile(fullname, wxBITMAP_TYPE_ICO);
+}
+
 wxIcon::~wxIcon()
 {
 }