- LoadFile(icon_file, (wxBitmapType) flags, desiredWidth, desiredHeight);
+ LoadFile( icon_file, (wxBitmapType) flags, desiredWidth, desiredHeight );
+}
+
+wxIcon::wxIcon(WXHICON icon, const wxSize& size)
+ : wxGDIObject()
+{
+ // as the icon owns that ref, we have to acquire it as well
+ if (icon)
+ AcquireIconRef( (IconRef) icon ) ;
+
+ m_refData = new wxIconRefData( icon ) ;
+ M_ICONDATA->SetWidth( size.x ) ;
+ M_ICONDATA->SetHeight( size.y ) ;