]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/xpmhand.cpp
warning fix
[wxWidgets.git] / src / os2 / xpmhand.cpp
index 71eac3afa4f7e548e0f393210446c5cc3c3e6935..ee64879e4a35ee774853644a167350c0c518b394 100644 (file)
@@ -69,7 +69,7 @@ static void XpmToBitmap(
     pRefData->m_nHeight    = vBm.cy;
     pRefData->m_nDepth     = vBm.cPlanes * vBm.cBitCount;
     pRefData->m_nNumColors = rXpmAttr.npixels;
     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();
     if (pXmask)
     {
         wxMask*                     pMask = new wxMask();
@@ -80,7 +80,6 @@ static void XpmToBitmap(
                                                      ));
         pBitmap->SetMask(pMask);
     }
                                                      ));
         pBitmap->SetMask(pMask);
     }
-#endif
 } // end of XpmToBitmap
 
 IMPLEMENT_DYNAMIC_CLASS(wxXPMFileHandler, wxBitmapHandler)
 } // end of XpmToBitmap
 
 IMPLEMENT_DYNAMIC_CLASS(wxXPMFileHandler, wxBitmapHandler)
@@ -114,6 +113,7 @@ bool wxXPMFileHandler::LoadFile(
                                                                       ,&vXpmAttr
                                                                      );
         ::GpiDestroyPS(hPS);
                                                                       ,&vXpmAttr
                                                                      );
         ::GpiDestroyPS(hPS);
+        ::DevCloseDC(hDC);
         if (nErrorStatus == XpmSuccess)
         {
             XpmToBitmap( pBitmap
         if (nErrorStatus == XpmSuccess)
         {
             XpmToBitmap( pBitmap
@@ -181,6 +181,7 @@ bool wxXPMFileHandler::SaveFile(
                                                                          ,(XpmAttributes *) NULL
                                                                         );
         ::GpiDestroyPS(hPS);
                                                                          ,(XpmAttributes *) NULL
                                                                         );
         ::GpiDestroyPS(hPS);
+        ::DevCloseDC(hDC);
         return (nErrorStatus == XpmSuccess);
     }
     return FALSE;
         return (nErrorStatus == XpmSuccess);
     }
     return FALSE;
@@ -210,13 +211,15 @@ bool wxXPMDataHandler::Create(
     if (hPS)
     {
         vXpmAttr.valuemask = XpmReturnInfos | XpmColorTable;
     if (hPS)
     {
         vXpmAttr.valuemask = XpmReturnInfos | XpmColorTable;
+
         int                         nErrorStatus = XpmCreateImageFromData( &hPS
                                                                           ,(char **)pData
                                                                           ,&pXimage
                                                                           ,&pXmask
                                                                           ,&vXpmAttr
                                                                          );
         int                         nErrorStatus = XpmCreateImageFromData( &hPS
                                                                           ,(char **)pData
                                                                           ,&pXimage
                                                                           ,&pXmask
                                                                           ,&vXpmAttr
                                                                          );
-        GpiDestroyPS(hPS);
+        ::GpiDestroyPS(hPS);
+        ::DevCloseDC(hDC);
         if (nErrorStatus == XpmSuccess)
         {
             XpmToBitmap( pBitmap
         if (nErrorStatus == XpmSuccess)
         {
             XpmToBitmap( pBitmap