wxCrafter Bitmap File Format

Post here wxCrafter related issues / features / bugs
Netzschleicher
CodeLite Enthusiast
Posts: 33
Joined: Fri Aug 13, 2010 10:45 pm
Genuine User: Yes
IDE Question: C++
Contact:

wxCrafter Bitmap File Format

Post by Netzschleicher »

Hello together,

can anyone tell me what File Formats for Setting Bitmaps in wxCrafter can i use. On setting a png-File i get an Error like this:

18:50:11: Unknown image data format.
18:50:11: XRC error: cannot create bitmap from "Ui_MainWindow_bitmaps.cpp$Bitmaps_appiconsmall.png"

The png-File is an Icon downloaded from free Icon-Set.

Greetings
Netzschleicher

User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: wxCrafter Bitmap File Format

Post by eranif »

Make sure you enable the PNGHandler in wxWidgets

You need to add a call similar to this somewhere in your code:

Code: Select all

    wxXmlResource::Get()->InitAllHandlers();
    wxImage::AddHandler(new wxPNGHandler);

Prefereably, in your wxApp subclass OnInit method

Make sure you have read the HOW TO POST thread
Post Reply