- if ( handler )
- return handler->LoadFile(this, filename, type, desiredWidth, desiredHeight);
- else
- return FALSE;
+bool wxIcon::LoadFile(const wxString& filename, wxBitmapType type,
+ int desiredWidth, int desiredHeight)
+{
+ UnRef();
+
+ m_refData = new wxBitmapRefData;
+
+ wxBitmapHandler *handler = FindHandler(type);
+
+ if ( handler )
+ return handler->LoadFile(this, filename, type,
+ desiredWidth, desiredHeight);
+ else
+ return FALSE;