#endif
#if !USE_SHARED_LIBRARY
-IMPLEMENT_DYNAMIC_CLASS(wxToolBarMSW, wxToolBarBase)
+IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxToolBarBase)
BEGIN_EVENT_TABLE(wxToolBarMSW, wxToolBarBase)
EVT_SIZE(wxToolBarMSW::OnSize)
}
long x, y;
- event.Position(&x, &y);
+ event.GetPosition(&x, &y);
wxToolBarTool *tool = FindToolForPosition(x, y);
if (!tool)
wxBitmap bitmap2;
if (toggle)
{
- bitmap2.SetHBITMAP( (WXHBITMAP) CreateMappedBitmap(wxGetInstance(), (HBITMAP) ((wxBitmap& )bitmap).GetHBITMAP()));
+ bitmap2.SetHBITMAP( (WXHBITMAP) CreateMappedBitmap((WXHINSTANCE)wxGetInstance(), (WXHBITMAP) ((wxBitmap& )bitmap).GetHBITMAP()));
}
wxToolBarTool *tool = new wxToolBarTool(index, bitmap, bitmap2, toggle, xPos, yPos, helpString1, helpString2);
return tool;
}
-void wxToolBarMSW::Layout(void)
+void wxToolBarMSW::LayoutTools()
{
m_currentRowsOrColumns = 0;
m_lastX = m_xMargin;
node = node->Next();
}
if ( GetWindowStyleFlag() & wxTB_HORIZONTAL )
+ {
m_maxWidth += maxToolWidth;
+ m_maxHeight += maxToolHeight;
+ }
else
+ {
+ m_maxWidth += maxToolWidth;
m_maxHeight += maxToolHeight;
+ }
m_maxWidth += m_xMargin;
m_maxHeight += m_yMargin;
+
+ SetSize(m_maxWidth, m_maxHeight);
}
WXHBITMAP wxToolBarMSW::CreateMappedBitmap(WXHINSTANCE hInstance, WXHBITMAP hBitmap)
{
- HANDLE hDIB = BitmapToDIB((HBITMAP) hBitmap, 0);
+ HANDLE hDIB = wxBitmapToDIB((HBITMAP) hBitmap, 0);
if (hDIB)
{
#ifdef __WINDOWS_386__