X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8ef38fd9f880f60c249a9e77a3f72aa58ffc00ee..51072df23ffcf5bdd4651dbe0ad5143b1e360119:/src/os2/xpmhand.cpp diff --git a/src/os2/xpmhand.cpp b/src/os2/xpmhand.cpp index 71eac3afa4..494bcf6008 100644 --- a/src/os2/xpmhand.cpp +++ b/src/os2/xpmhand.cpp @@ -36,7 +36,7 @@ #if wxUSE_XPM_IN_OS2 #define FOR_MSW 1 - #include "../xpm/xpm.h" + #include "xpm.h" #endif #include "wx/xpmhand.h" @@ -69,7 +69,7 @@ static void XpmToBitmap( pRefData->m_nHeight = vBm.cy; pRefData->m_nDepth = vBm.cPlanes * vBm.cBitCount; pRefData->m_nNumColors = rXpmAttr.npixels; -#if 0 + if (pXmask) { wxMask* pMask = new wxMask(); @@ -80,7 +80,6 @@ static void XpmToBitmap( )); pBitmap->SetMask(pMask); } -#endif } // end of XpmToBitmap IMPLEMENT_DYNAMIC_CLASS(wxXPMFileHandler, wxBitmapHandler) @@ -114,6 +113,7 @@ bool wxXPMFileHandler::LoadFile( ,&vXpmAttr ); ::GpiDestroyPS(hPS); + ::DevCloseDC(hDC); if (nErrorStatus == XpmSuccess) { XpmToBitmap( pBitmap @@ -181,6 +181,7 @@ bool wxXPMFileHandler::SaveFile( ,(XpmAttributes *) NULL ); ::GpiDestroyPS(hPS); + ::DevCloseDC(hDC); return (nErrorStatus == XpmSuccess); } return FALSE; @@ -210,13 +211,15 @@ bool wxXPMDataHandler::Create( if (hPS) { vXpmAttr.valuemask = XpmReturnInfos | XpmColorTable; + int nErrorStatus = XpmCreateImageFromData( &hPS ,(char **)pData ,&pXimage ,&pXmask ,&vXpmAttr ); - GpiDestroyPS(hPS); + ::GpiDestroyPS(hPS); + ::DevCloseDC(hDC); if (nErrorStatus == XpmSuccess) { XpmToBitmap( pBitmap