I'm new to wxWidgets. As of today, I have a whole one days experience...
I've decided to port a program I originally wrote with C++ Builder around 20 years ago to wxWdgets. I think I'm getting on top of the situation and have the basics of the program working fine. However, I've hit a problem.
My program builds a 256x256 1 bpp image in memory (It's stores in a block of memory 8192 bytes long - 256 * 256 / . What's the fastest way of transferring this image to the onscreen window? I don't care about scaling, just getting it to the screen initially. Is there a way of building my own DC pointing at the buffer, or am I thinking about things in the wrong manor?
Thanks,
Mike
My first project
Re: My first project
Hello and welcome to the forum.
In general, support for monochrome bitmaps in wxWidgets is low. But this constructor can at least create a bitmap from monochrome data:
https://docs.wxwidgets.org/trunk/classw ... c1de516f21
There are several ways to display a wxBitmap on screen, in your case i suspect you want something custom drawn. This should get you started:
https://wiki.wxwidgets.org/Drawing_on_a_panel_with_a_DC
In general, support for monochrome bitmaps in wxWidgets is low. But this constructor can at least create a bitmap from monochrome data:
https://docs.wxwidgets.org/trunk/classw ... c1de516f21
There are several ways to display a wxBitmap on screen, in your case i suspect you want something custom drawn. This should get you started:
https://wiki.wxwidgets.org/Drawing_on_a_panel_with_a_DC
Use the source, Luke!