-bool wxICOFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
- int desiredWidth, int desiredHeight)
-{
-#if USE_RESOURCE_LOADING_IN_MSW
- if ( bitmap->IsKindOf(CLASSINFO(wxIcon)) )
- {
- wxIcon *icon = (wxIcon *)bitmap;
- wxIconRefData *data = (wxIconRefData *)icon->GetRefData();
- data->m_hIcon = (WXHICON)ReadIconFile((char *)name.c_str(), wxGetInstance(),
- &data->m_width, &data->m_height);
-
- data->m_ok = data->m_hIcon != 0;
- return data->m_ok;
- }
- else
- return FALSE;
-#else
- return FALSE;
-#endif
-}
-
-bool wxICOResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, 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