#include "wx/msw/gnuwin32/extra.h"
#endif
+#include "wx/msw/missing.h"
+
#include "wx/app.h" // for GetComCtl32Version
#if defined(__MWERKS__) && defined(__WXMSW__)
}
// reparent all our children under the new toolbar
- for ( wxWindowList::Node *node = m_children.GetFirst();
+ for ( wxWindowList::compatibility_iterator node = m_children.GetFirst();
node;
node = node->GetNext() )
{
// first determine the position of the first button to delete: it may be
// different from pos if we use several separators to cover the space used
// by a control
- wxToolBarToolsList::Node *node;
+ wxToolBarToolsList::compatibility_iterator node;
for ( node = m_tools.GetFirst(); node; node = node->GetNext() )
{
wxToolBarToolBase *tool2 = node->GetData();
// First, add the bitmap: we use one bitmap for all toolbar buttons
// ----------------------------------------------------------------
- wxToolBarToolsList::Node *node;
+ wxToolBarToolsList::compatibility_iterator node;
int bitmapId = 0;
wxSize sizeBmp;
{
wxToolBarToolBase *tool = node->GetData();
- // don't add separators to the vertical toolbar - looks ugly
- //if ( isVertical && tool->IsSeparator() )
- // continue;
+ // don't add separators to the vertical toolbar with old comctl32.dll
+ // versions as they didn't handle this properly
+ if ( isVertical && tool->IsSeparator() &&
+ wxTheApp->GetComCtl32Version() <= 472 )
+ {
+ continue;
+ }
+
TBBUTTON& button = buttons[i];
wxToolBarToolBase *GetItemSkippingDummySpacers(const wxToolBarToolsList& tools,
size_t index )
{
- wxToolBarToolsList::Node* current = tools.GetFirst();
+ wxToolBarToolsList::compatibility_iterator current = tools.GetFirst();
for ( ; current != 0; current = current->GetNext() )
{
h = r.bottom - r.top;
if ( m_maxRows )
{
- // FIXME: 6 is hardcoded separator line height...
- //h += 6;
- if (HasFlag(wxTB_NODIVIDER))
- h += 4;
- else
- h += 6;
+ // FIXME: hardcoded separator line height...
+ h += HasFlag(wxTB_NODIVIDER) ? 4 : 6;
h *= m_maxRows;
}
}
// any here
// first of all, do we have any controls at all?
- wxToolBarToolsList::Node *node;
+ wxToolBarToolsList::compatibility_iterator node;
for ( node = m_tools.GetFirst(); node; node = node->GetNext() )
{
if ( node->GetData()->IsControl() )