X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3dec57adfdb2469b7679930092f0bd9c8569d62c..892e461e3307b21676e9b0b0e588abc4e36dad31:/src/mac/carbon/icon.cpp?ds=sidebyside diff --git a/src/mac/carbon/icon.cpp b/src/mac/carbon/icon.cpp index 7bfb1d8309..0133e45534 100644 --- a/src/mac/carbon/icon.cpp +++ b/src/mac/carbon/icon.cpp @@ -61,7 +61,7 @@ bool wxIcon::LoadFile(const wxString& filename, long type, m_refData = new wxBitmapRefData; - wxBitmapHandler *handler = FindHandler(type); + wxBitmapHandler *handler = FindHandler((wxBitmapType)type); if ( handler ) return handler->LoadFile(this, filename, type, desiredWidth, desiredHeight); @@ -69,6 +69,12 @@ bool wxIcon::LoadFile(const wxString& filename, long type, return FALSE; } +void wxIcon::CopyFromBitmap(const wxBitmap& bmp) +{ + wxIcon *icon = (wxIcon*)(&bmp); + *this = *icon; +} + IMPLEMENT_DYNAMIC_CLASS(wxICONResourceHandler, wxBitmapHandler) bool wxICONResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags,