wxBitmapRefData::wxBitmapRefData()
{
+#ifdef __WXDEBUG__
m_selectedInto = NULL;
+#endif
m_bitmapMask = NULL;
m_hBitmap = (WXHBITMAP) NULL;
m_hasAlpha = FALSE;
return GetBitmapData() ? GetBitmapData()->GetMask() : (wxMask *) NULL;
}
+#ifdef __WXDEBUG__
+
wxDC *wxBitmap::GetSelectedInto() const
{
return GetBitmapData() ? GetBitmapData()->m_selectedInto : (wxDC *) NULL;
}
+#endif
+
#if WXWIN_COMPATIBILITY_2_4
int wxBitmap::GetQuality() const
// wxBitmap setters
// ----------------------------------------------------------------------------
+#ifdef __WXDEBUG__
+
void wxBitmap::SetSelectedInto(wxDC *dc)
{
if ( GetBitmapData() )
GetBitmapData()->m_selectedInto = dc;
}
+#endif
+
#if wxUSE_PALETTE
void wxBitmap::SetPalette(const wxPalette& palette)
if (m_oldBitmap)
{
::SelectObject((HDC) dc, (HBITMAP) m_oldBitmap);
+#ifdef __WXDEBUG__
if (m_selectedBitmap.Ok())
{
m_selectedBitmap.SetSelectedInto(NULL);
}
+#endif
}
m_oldBitmap = 0;
if (m_oldPen)
::SelectObject(GetHdc(), (HBITMAP) m_oldBitmap);
if ( m_selectedBitmap.Ok() )
{
+#ifdef __WXDEBUG__
m_selectedBitmap.SetSelectedInto(NULL);
+#endif
m_selectedBitmap = wxNullBitmap;
}
}
if ( !hBmp )
return;
+#ifdef __WXDEBUG__
m_selectedBitmap.SetSelectedInto(this);
+#endif
hBmp = (WXHBITMAP)::SelectObject(GetHdc(), (HBITMAP)hBmp);
if ( !hBmp )