X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aa21388719bc324227895bd2f1328d533dc130e2..8a3f08bc6f9d7d7ece178d98fe01ac3ef45e1509:/src/os2/gdiimage.cpp diff --git a/src/os2/gdiimage.cpp b/src/os2/gdiimage.cpp index d3b1965074..321e61e1c1 100644 --- a/src/os2/gdiimage.cpp +++ b/src/os2/gdiimage.cpp @@ -335,7 +335,9 @@ void wxGDIImage::CleanUpHandlers() wxNode* pNext = pNode->Next(); delete pHandler; +#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ))) delete pNode; +#endif pNode = pNext; } } @@ -518,42 +520,23 @@ bool wxICOResourceHandler::LoadIcon( , const wxString& rName , HPS hPs , long lFlags -, int nDesiredWidth -, int nDesiredHeight +, int WXUNUSED(nDesiredWidth) +, int WXUNUSED(nDesiredHeight) ) { - // TODO: load icon from a file - /* - HICON hicon; + HPOINTER hIcon; -#if defined(__WIN32__) && !defined(__SC__) - if ( desiredWidth != -1 && desiredHeight != -1 ) - { - hicon = (HICON)::LoadImage(wxGetInstance(), name, IMAGE_ICON, - desiredWidth, desiredHeight, - LR_DEFAULTCOLOR); - } - else -#endif // Win32 - { - hicon = ::LoadIcon(wxGetInstance(), name); - } + hIcon = ::WinLoadFileIcon( (PSZ)rName.c_str() + ,TRUE // load for private use + ); - wxSize size = GetHiconSize(hicon); - icon->SetSize(size.x, size.y); + pIcon->SetSize(32, 32); // all OS/2 icons are 32 x 32 - // Override the found values with desired values - if ( desiredWidth > -1 && desiredHeight > -1 ) - { - icon->SetSize(desiredWidth, desiredHeight); - } - icon->SetHICON((WXHICON)hicon); + pIcon->SetHICON((WXHICON)hIcon); - return icon->Ok(); - */ - return(FALSE); -} + return pIcon->Ok(); +} // end of wxICOResourceHandler::LoadIcon // ---------------------------------------------------------------------------- // private functions