made wxBitmapRefData private (actually, this also fixes some bug so it's not absolutely gratitious, but I already closed the bug not knowing that my cvs checkin was going to timeout and die and don't remember any more what it was...)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -323,27 +323,26 @@ bool wxBMPResourceHandler::LoadFile(wxBitmap *bitmap,
|
||||
// TODO: load colourmap.
|
||||
bitmap->SetHBITMAP((WXHBITMAP)::LoadBitmap(wxGetInstance(), name));
|
||||
|
||||
wxBitmapRefData *data = bitmap->GetBitmapData();
|
||||
if ( bitmap->Ok() )
|
||||
{
|
||||
BITMAP bm;
|
||||
if ( !::GetObject(GetHbitmapOf(*bitmap), sizeof(BITMAP), (LPSTR) &bm) )
|
||||
{
|
||||
wxLogLastError(wxT("GetObject(HBITMAP)"));
|
||||
}
|
||||
|
||||
data->m_width = bm.bmWidth;
|
||||
data->m_height = bm.bmHeight;
|
||||
data->m_depth = bm.bmBitsPixel;
|
||||
}
|
||||
else
|
||||
if ( !bitmap->Ok() )
|
||||
{
|
||||
// it's probably not found
|
||||
wxLogError(wxT("Can't load bitmap '%s' from resources! Check .rc file."),
|
||||
name.c_str());
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return bitmap->Ok();
|
||||
BITMAP bm;
|
||||
if ( !::GetObject(GetHbitmapOf(*bitmap), sizeof(BITMAP), (LPSTR) &bm) )
|
||||
{
|
||||
wxLogLastError(wxT("GetObject(HBITMAP)"));
|
||||
}
|
||||
|
||||
bitmap->SetWidth(bm.bmWidth);
|
||||
bitmap->SetHeight(bm.bmHeight);
|
||||
bitmap->SetDepth(bm.bmBitsPixel);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxBMPFileHandler::LoadFile(wxBitmap *bitmap,
|
||||
|
Reference in New Issue
Block a user