2

I would like my executable to be self-contained. However, the wxHtmlWindow uses an image and it would be nice if the image could be stored inside the executable.

Can this be done, and if so how?

Nathan Osman
  • 71,149
  • 71
  • 256
  • 361

1 Answers1

1

Yes, use memory: schema. See my code in http://mahogany.git.sourceforge.net/git/gitweb.cgi?p=mahogany/M;a=blob_plain;f=src/gui/wxMDialogs.cpp;hb=HEAD for example (just search for "memory:" there).

Don't forget to register wxMemoryFSHandler or this won't work!

VZ.
  • 21,740
  • 3
  • 39
  • 42
  • Excuse me, but can you tell me how to use a **dynamically created** image? For example, `wxBitmap bitmap(500,500); wxMemoryDC dc(bitmap);` and further drawing through `dc`. How to add such an image via `wxMemoryFSHandler::AddFile`? – Mikhailo Feb 21 '23 at 07:44