m_hBitmap = 0;
}
- if ( m_disabledImgList )
- {
- delete m_disabledImgList;
- m_disabledImgList = NULL;
- }
+ wxDELETE(m_disabledImgList);
Realize();
}
void wxToolBar::CreateDisabledImageList()
{
- if (m_disabledImgList != NULL)
- {
- delete m_disabledImgList;
- m_disabledImgList = NULL;
- }
+ wxDELETE(m_disabledImgList);
// as we can't use disabled image list with older versions of comctl32.dll,
// don't even bother creating it
// reduce their size if there is not enough place for all tools
const int totalSize = IsVertical() ? GetClientSize().y : GetClientSize().x;
const int extraSize = totalSize - m_totalFixedSize;
- const int sizeSpacer = extraSize > 0 ? extraSize / numSpaces : 0;
+ const int sizeSpacer = extraSize > 0 ? extraSize / numSpaces : 1;
// the last spacer should consume all remaining space if we have too much
// of it (which can be greater than sizeSpacer because of the rounding)
const int sizeLastSpacer = extraSize > 0
? extraSize - (numSpaces - 1)*sizeSpacer
- : 0;
+ : 1;
// cumulated offset by which we need to move all the following controls to
// the right: while the toolbar takes care of the normal items, we must
wxBrush * const
brush = wxTheBrushList->FindOrCreateBrush(colBg);
- return brush ? brush->GetResourceHandle() : 0;
+ return brush ? static_cast<WXHBRUSH>(brush->GetResourceHandle()) : 0;
}
WXHBRUSH wxToolBar::MSWGetBgBrushForChild(WXHDC hDC, wxWindowMSW *child)