m_pSelectedInto = NULL;
m_nNumColors = 0;
m_pBitmapMask = NULL;
- m_hBitmap = (WXHBITMAP) NULL;
+ m_hBitmap = (WXHBITMAP) NULL;
} // end of wxBitmapRefData::wxBitmapRefData
void wxBitmapRefData::Free()
wxLogLastError("GpiDeleteBitmap(hbitmap)");
}
}
-
- delete m_pBitmapMask;
- m_pBitmapMask = NULL;
+ if (m_pBitmapMask)
+ {
+ delete m_pBitmapMask;
+ m_pBitmapMask = NULL;
+ }
} // end of wxBitmapRefData::Free
// ----------------------------------------------------------------------------
} // end of wxBitmap::wxBitmap
wxBitmap::wxBitmap(
- const wxString& rFilename
+ int nId
, long lType
)
{
Init();
- LoadFile( rFilename
+ LoadFile( nId
,(int)lType
);
+ SetId(nId);
} // end of wxBitmap::wxBitmap
bool wxBitmap::Create(
} // end of wxBitmap::CreateFromXpm
bool wxBitmap::LoadFile(
- const wxString& rFilename
+ int nId
, long lType
)
{
m_refData = new wxBitmapRefData;
return(pHandler->LoadFile( this
- ,rFilename
- ,hPs
+ ,nId
,lType
, -1
, -1
}
else
{
- wxImage vImage;
-
- if (!vImage.LoadFile(rFilename, lType) || !vImage.Ok() )
- return(FALSE);
-
- *this = wxBitmap(vImage);
-
- return(TRUE);
+ return(FALSE);
}
} // end of wxBitmap::LoadFile
// ----------------------------------------------------------------------------
-// wxImage-wxBitmap convertion
+// wxImage-wxBitmap conversion
// ----------------------------------------------------------------------------
bool wxBitmap::CreateFromImage (
bool wxBitmapHandler::Load(
wxGDIImage* pImage
-, const wxString& rName
-, HPS hPs
+, int nId
, long lFlags
, int nWidth
, int nHeight
);
return(pBitmap ? LoadFile( pBitmap
- ,rName
- ,hPs
+ ,nId
,lFlags
,nWidth
,nHeight
bool wxBitmapHandler::LoadFile(
wxBitmap* WXUNUSED(pBitmap)
-, const wxString& WXUNUSED(rName)
-, HPS WXUNUSED(hPs)
+, int WXUNUSED(nId)
, long WXUNUSED(lType)
, int WXUNUSED(nDesiredWidth)
, int WXUNUSED(nDesiredHeight)