]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/gdiimage.cpp
fixed WM_GETDLGCODE processing to include the bits returned by the DefWindowProc...
[wxWidgets.git] / src / msw / gdiimage.cpp
index 3ead2479d1d150bc10f7df5accefc8037c70a6f8..26e92921109019ac763d12375cd9c4a30fab4549 100644 (file)
@@ -175,10 +175,10 @@ private:
 // wxWin macros
 // ----------------------------------------------------------------------------
 
-    IMPLEMENT_DYNAMIC_CLASS(wxBMPFileHandler, wxBitmapHandler)
-    IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler, wxBitmapHandler)
-    IMPLEMENT_DYNAMIC_CLASS(wxICOFileHandler, wxGDIImageHandler)
-    IMPLEMENT_DYNAMIC_CLASS(wxICOResourceHandler, wxGDIImageHandler)
+IMPLEMENT_DYNAMIC_CLASS(wxBMPFileHandler, wxBitmapHandler)
+IMPLEMENT_DYNAMIC_CLASS(wxBMPResourceHandler, wxBitmapHandler)
+IMPLEMENT_DYNAMIC_CLASS(wxICOFileHandler, wxObject)
+IMPLEMENT_DYNAMIC_CLASS(wxICOResourceHandler, wxObject)
 
 // ----------------------------------------------------------------------------
 // private functions
@@ -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();