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:
Vadim Zeitlin
2003-01-22 17:43:02 +00:00
parent 33a7c3dd0b
commit 8bbbae215c
4 changed files with 176 additions and 109 deletions

View File

@@ -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,