1. more drag and drop and clipboard changes:
a) OLE clipboard works fine b) wxBitmapDataObject now accepts DIBs (but doesn't give them back :-( ) c) bugs in sample corrected 2. wxFatalExit() replaced with wxFAIL_MSG() in bitmap.cpp and dcmemory.cpp 3. wxFrame::ClientToScreen and ScreenToClient() replaced with DoXXX() - like this, they don't hide the base class versions git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -77,22 +77,14 @@ wxBitmapRefData::wxBitmapRefData()
|
||||
|
||||
wxBitmapRefData::~wxBitmapRefData()
|
||||
{
|
||||
if (m_selectedInto)
|
||||
{
|
||||
wxChar buf[200];
|
||||
wxSprintf(buf, wxT("Bitmap was deleted without selecting out of wxMemoryDC %lX."), (unsigned long) m_selectedInto);
|
||||
wxFatalError(buf);
|
||||
}
|
||||
if (m_hBitmap)
|
||||
{
|
||||
DeleteObject((HBITMAP) m_hBitmap);
|
||||
}
|
||||
m_hBitmap = 0 ;
|
||||
wxASSERT_MSG( !m_selectedInto,
|
||||
wxT("deleting bitmap still selected into wxMemoryDC") );
|
||||
|
||||
if (m_bitmapMask)
|
||||
delete m_bitmapMask;
|
||||
m_bitmapMask = NULL;
|
||||
if ( m_hBitmap)
|
||||
DeleteObject((HBITMAP) m_hBitmap);
|
||||
|
||||
if ( m_bitmapMask )
|
||||
delete m_bitmapMask;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -143,12 +135,9 @@ bool wxBitmap::FreeResource(bool WXUNUSED(force))
|
||||
if ( !M_BITMAPDATA )
|
||||
return FALSE;
|
||||
|
||||
if (M_BITMAPDATA->m_selectedInto)
|
||||
{
|
||||
wxChar buf[200];
|
||||
wxSprintf(buf, wxT("Bitmap %lX was deleted without selecting out of wxMemoryDC %lX."), (unsigned long) this, (unsigned long) M_BITMAPDATA->m_selectedInto);
|
||||
wxFatalError(buf);
|
||||
}
|
||||
wxASSERT_MSG( !M_BITMAPDATA->m_selectedInto,
|
||||
wxT("freeing bitmap still selected into wxMemoryDC") );
|
||||
|
||||
if (M_BITMAPDATA->m_hBitmap)
|
||||
{
|
||||
DeleteObject((HBITMAP) M_BITMAPDATA->m_hBitmap);
|
||||
|
Reference in New Issue
Block a user