]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/gdiimage.cpp
don't write the strings to the stream one char at a time, it's *horribly* slow
[wxWidgets.git] / src / msw / gdiimage.cpp
index 38a1d16db2a0cf34000a3ca2c8b235c2a34b57ca..26e92921109019ac763d12375cd9c4a30fab4549 100644 (file)
@@ -511,6 +511,9 @@ bool wxICOResourceHandler::LoadIcon(wxIcon *icon,
     // try to load the icon from this program first to allow overriding the
     // standard icons (although why one would want to do it considering that
     // we already have wxApp::GetStdIcon() is unclear)
+
+    // note that we can't just always call LoadImage() because it seems to do
+    // some icon rescaling internally which results in very ugly 16x16 icons
 #if defined(__WIN32__) && !defined(__SC__)
     if ( hasSize )
     {
@@ -519,7 +522,7 @@ bool wxICOResourceHandler::LoadIcon(wxIcon *icon,
                                     LR_DEFAULTCOLOR);
     }
     else
-#endif // Win32
+#endif // Win32/!Win32
     {
         hicon = ::LoadIcon(wxGetInstance(), name);
     }
@@ -536,7 +539,7 @@ bool wxICOResourceHandler::LoadIcon(wxIcon *icon,
             { wxT("wxICON_QUESTION"),   IDI_QUESTION    },
             { wxT("wxICON_WARNING"),    IDI_EXCLAMATION },
             { wxT("wxICON_ERROR"),      IDI_HAND        },
-            { wxT("wxICON_INFO"),       IDI_ASTERISK    },
+            { wxT("wxICON_INFORMATION"),       IDI_ASTERISK    },
         };
 
         for ( size_t nIcon = 0; !hicon && nIcon < WXSIZEOF(stdIcons); nIcon++ )
@@ -551,12 +554,6 @@ bool wxICOResourceHandler::LoadIcon(wxIcon *icon,
     wxSize size = GetHiconSize(hicon);
     icon->SetSize(size.x, size.y);
 
-    // Override the found values with desired values
-    if ( desiredWidth > -1 && desiredHeight > -1 )
-    {
-        icon->SetSize(desiredWidth, desiredHeight);
-    }
-
     icon->SetHICON((WXHICON)hicon);
 
     return icon->Ok();