X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..12bb29f5432174ecbd65549bda832d70d34a98ae:/src/msw/icon.cpp diff --git a/src/msw/icon.cpp b/src/msw/icon.cpp index fdd9d501c3..dccefc51cc 100644 --- a/src/msw/icon.cpp +++ b/src/msw/icon.cpp @@ -156,3 +156,14 @@ bool wxIcon::LoadFile(const wxString& filename, return handler->Load(this, filename, type, desiredWidth, desiredHeight); } + +bool wxIcon::CreateFromHICON(WXHICON icon) +{ + SetHICON(icon); + if ( !IsOk() ) + return false; + + SetSize(wxGetHiconSize(icon)); + + return true; +}