-bool wxICOFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, const long flags,
- int desiredWidth, int desiredHeight)
-{
-#if USE_RESOURCE_LOADING_IN_MSW
- if ( bitmap->IsKindOf(CLASSINFO(wxIcon)) )
- {
- wxIcon *icon = (wxIcon *)bitmap;
- int width, height;
- WXHICON hIcon = (WXHICON) ReadIconFile((char *)(const char *)name, wxGetInstance(), &width, &height);
-
- ((wxIconRefData *)icon->GetRefData())->m_hIcon = hIcon;
- ((wxIconRefData *)icon->GetRefData())->m_ok = (((wxIconRefData *)icon->GetRefData())->m_hIcon != 0);
- return ((wxIconRefData *)icon->GetRefData())->m_ok;
- }
- else
- return FALSE;
-#else
- return FALSE;
-#endif
-}
-
-bool wxICOResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, const long flags,
- int desiredWidth, int desiredHeight)
-{
- if ( bitmap->IsKindOf(CLASSINFO(wxIcon)) )
- {
-#if defined(__WIN32__)
- if (desiredWidth > -1 && desiredHeight > -1)
- {
- M_ICONHANDLERDATA->m_hIcon = (WXHICON) ::LoadImage(wxGetInstance(), name, IMAGE_ICON, desiredWidth, desiredHeight, LR_DEFAULTCOLOR);
- }
- else
-#endif