git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36227
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void wxToolBar::CreateDisabledImageList()
{
void wxToolBar::CreateDisabledImageList()
{
+ if (m_disabledImgList != NULL)
+ {
+ delete m_disabledImgList;
+ m_disabledImgList = NULL;
+ }
+
// as we can't use disabled image list with older versions of comctl32.dll,
// don't even bother creating it
if ( wxTheApp->GetComCtl32Version() >= 470 )
// as we can't use disabled image list with older versions of comctl32.dll,
// don't even bother creating it
if ( wxTheApp->GetComCtl32Version() >= 470 )
bmpDisabled.GetMask() != NULL,
GetToolsCount()
);
bmpDisabled.GetMask() != NULL,
GetToolsCount()
);
}
}
// we don't have any disabled bitmaps
}
}
}
// we don't have any disabled bitmaps
}
-
- m_disabledImgList = NULL;
}
bool wxToolBar::Realize()
}
bool wxToolBar::Realize()
totalBitmapWidth, totalBitmapHeight);
dcAllButtons.SelectObject(bitmap);
totalBitmapWidth, totalBitmapHeight);
dcAllButtons.SelectObject(bitmap);
// Map to system colours
hBitmap = (HBITMAP)MapBitmap((WXHBITMAP) hBitmap,
totalBitmapWidth, totalBitmapHeight);
// Map to system colours
hBitmap = (HBITMAP)MapBitmap((WXHBITMAP) hBitmap,
totalBitmapWidth, totalBitmapHeight);