Set HBITMAP and its parameters in one call

To avoid separate calls to SetWidth/Height/Size/Depth functions after calling SetHBITMAP() use newly implemented InitFromHBITMAP() function which allows to set HBITMAP together with its parameters in one call.
This commit is contained in:
Artur Wieczorek
2018-09-11 21:44:56 +02:00
parent 12c44f1c79
commit 97f73acddb
5 changed files with 58 additions and 25 deletions

View File

@@ -953,7 +953,7 @@ bool wxToolBar::Realize()
{
hBitmap = GetHbitmapOf(bitmap);
// don't delete this HBITMAP!
bitmap.SetHBITMAP(0);
bitmap.ResetHBITMAP();
}
if ( remapValue == Remap_Buttons )