Make raw pixel access work even with DDBs under MSW.

This is inefficient, because we need to copy pixels to and from them, but
better than silently doing nothing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-12-28 15:11:34 +00:00
parent 7ce66e3c43
commit 11d0e0f943

View File

@@ -242,6 +242,8 @@ void wxBitmapRefData::Free()
{
wxLogLastError(wxT("DeleteObject(hbitmap)"));
}
m_hBitmap = 0;
}
wxDELETE(m_bitmapMask);
@@ -1329,7 +1331,8 @@ void wxBitmap::UngetRawData(wxPixelDataBase& dataBase)
wxDIB *dib = GetBitmapData()->m_dib;
GetBitmapData()->m_dib = NULL;
// TODO: convert
GetBitmapData()->Free();
GetBitmapData()->CopyFromDIB(*dib);
delete dib;
}