wxImage image;
if (image.LoadFile("backgrnd.png", wxBITMAP_TYPE_PNG))
{
- m_background = image.ConvertToBitmap();
+ m_background = wxBitmap(image);
}
MyFrame *frame = new MyFrame();
{
wxString filename;
filename.Printf(wxT("%s%d.png"), (const wxChar*)rootName, i);
- /* For some reason under wxX11, the 2nd LoadFile in this loop fails, with
- a BadMatch inside CreateFromImage (inside ConvertToBitmap). This happens even if you copy
- the first file over the second file. */
+ /* For some reason under wxX11, the 2nd LoadFile in this loop fails, with
+ a BadMatch inside CreateFromImage (inside ConvertToBitmap). This happens even if you copy
+ the first file over the second file. */
if (image.LoadFile(filename, wxBITMAP_TYPE_PNG))
{
- DragShape* newShape = new DragShape(image.ConvertToBitmap());
+ DragShape* newShape = new DragShape(wxBitmap(image));
newShape->SetPosition(wxPoint(i*50, i*50));
if (i == 2)