What control to add to box sizer to show wxClientDC?
Posted: Wed Jul 29, 2015 4:23 pm
I can swap the bitmap of a toolbar item, but how do I show bitmap in place of wxStaticText and such?
The bitmap flashes in the upper left corner of this (the window).
PS. I don't want to use wxGraphicsContext, since that would mean recompiling wxWidgets.
EDIT: wxStaticBitmap doesn't accept large enough images.
Some of my images are small enough, but only first call to SetBitmap centers the image. After that all images are drawn to upper left corner.
Code: Select all
GetToolBar()->SetToolNormalBitmap(ToolBar_Hex, SLPtoBitMap(50705, 0));
wxClientDC dc(this);
dc.DrawBitmap(SLPtoBitMap(50705, 1), 0, 0, true);
PS. I don't want to use wxGraphicsContext, since that would mean recompiling wxWidgets.
EDIT: wxStaticBitmap doesn't accept large enough images.
Some of my images are small enough, but only first call to SetBitmap centers the image. After that all images are drawn to upper left corner.