wxC7C26InitBitmapResources();

Post here wxCrafter related issues / features / bugs
coder99
CodeLite Expert
Posts: 167
Joined: Wed Oct 22, 2008 6:50 am
Contact:

wxC7C26InitBitmapResources();

Post by coder99 »

In building up another GUI using wxCR 1.3 I end up with this code fragment in my base frame cpp:

Code: Select all

// Declare the bitmap loading function
extern void wxC7C26InitBitmapResources();  <<<<<<<<<<<<<<<<<<<<

static bool bBitmapLoaded = false;


MyFrameBase::MyFrameBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
    : wxFrame(parent, id, title, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxC7C26InitBitmapResources();
        bBitmapLoaded = true;
    }
......
}
But I cannot find wxC7C26InitBitmapResources() anywhere.

The GUI does use XMP icons in the tool bar - possibly that is the problem??

The icons display well enough in wxCR

Win 10/11 64-bit, MSVC 2019/2022, wxWidgets 3.2.1, CodeLite 17.0 Mint 21.2

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

Re: wxC7C26InitBitmapResources();

Post by eranif »

wxCrafter generates another file with the prefix *_bitmap.cpp file, make sure you add it also to your workspace
It is explained here:

http://codelite.org/LiteEditor/WxCrafterHelloWorld

Eran
Make sure you have read the HOW TO POST thread
coder99
CodeLite Expert
Posts: 167
Joined: Wed Oct 22, 2008 6:50 am
Contact:

Re: wxC7C26InitBitmapResources();

Post by coder99 »

Thank you, Eran
I had missed that one and, of course, because it was not part of the project, the search in the project did not find it., but ...
when I add the file to my project, I get:
3>wxMetaf_wxmeta-wxcr_bitmaps.cpp(345): error C2466: cannot allocate an array of constant size 0

this is apparently due to my adding blank tool bar items, in place of spacers.
These blanks seem to default to include a file %USER%\AppData\Local\Temp\placeholder16.png
which does exist.
Removing the file path removed the array with 0 size and lets the compile complete.

Win 10/11 64-bit, MSVC 2019/2022, wxWidgets 3.2.1, CodeLite 17.0 Mint 21.2

Post Reply