X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8ea3f821b7efe6a1a0b9f5119274d4aac8d5f8cb..bada28f00f12666ef31f0543cea2cde86b7935c7:/src/os2/icon.cpp?ds=sidebyside diff --git a/src/os2/icon.cpp b/src/os2/icon.cpp index d3d3f49313..26f744c91f 100644 --- a/src/os2/icon.cpp +++ b/src/os2/icon.cpp @@ -68,7 +68,15 @@ wxIcon::wxIcon( , int nDesiredHeight ) { - LoadFile( rIconFile + // + // A very poor hack, but we have to have separate icon files from windows + // So we have a modified name where replace the last three characters + // with os2. Also need the extension. + // + wxString sOs2Name = rIconFile.Mid(0, rIconFile.Length() - 3); + + sOs2Name += "Os2.ico"; + LoadFile( sOs2Name ,lFlags ,nDesiredWidth ,nDesiredHeight @@ -86,11 +94,11 @@ bool wxIcon::LoadFile( , int nDesiredHeight ) { - wxGDIImageHandler* pHandler = FindHandler(lType); HPS hPs = NULLHANDLE; UnRef(); - m_refData = new wxIconRefData; + + wxGDIImageHandler* pHandler = FindHandler(lType); if (pHandler) return(pHandler->Load( this