wxC7C26InitBitmapResources();

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

wxC7C26InitBitmapResources();

Post by coder99 » Sat Dec 28, 2013 12:48 am

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 64-bit, MSVC 2017/2019, wxWidgets 3.1.0, CodeLite 13.0 Mint 19.2
Fight Spam, report it with wxSR

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

Re: wxC7C26InitBitmapResources();

Post by eranif » Sat Dec 28, 2013 12:53 am

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: 146
Joined: Wed Oct 22, 2008 6:50 am
Contact:

Re: wxC7C26InitBitmapResources();

Post by coder99 » Sat Dec 28, 2013 1:24 am

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 64-bit, MSVC 2017/2019, wxWidgets 3.1.0, CodeLite 13.0 Mint 19.2
Fight Spam, report it with wxSR

Post Reply