To use icons linked in a win32 project with a windows rc file now I have to use this trick:
- In the container widget, that contains the bitmap buttons, add the code:
#define wxBITMAP_TYPE_ANY wxBITMAP_TYPE_BMP_RESOURCE
this can be done directly in wxGlade in the code panel.
in wxGlade IDE select the bitmap files to show images in the IDE.
In the resources file (*.rc) use real bitmap names, with the extension.
The file name becomes the resource name. For example:
floppy.bmp BITMAP "floppy.bmp"
Would you please update an example, e.g. as zip archive? Otherwise I don't understand the problem.
The problem is:
Supposing you are using wxglade to create the gui for a windows application in c++/wxwidgets, how can you use bitmaps, icons etc that are normally part of a windows application in the form of "resources" (rc file -> res) and linked with the executable?
It seems to me that you are forced to load image files (bitmaps etc) at runtime, and that is weird for a windows application.
At least in the wxglade version I was using at that time, don't know if there are improvements. I don't have used it for some time now.
With the trick described I was able to use windows resources with wxglade, in the form of image files during the gui design and then as linked resources in the executable.
Last edit: Dietmar Schwertberger 2017-12-06
To be re-opened if example code is available.
See also documentation at http://wxglade.sourceforge.net/docs/bitmaps.html
(section "Customizing Bitmap loading")