// Modified by:
// Created: 04/01/98
// RCS-ID: $Id$
-// Copyright: (c) Julian Smart and Markus Holzem
-// Licence: wxWindows license
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
#include "wx/msw/private.h"
-#ifndef __TWIN32__
-
-#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
+#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
#include <commctrl.h>
#else
#include "wx/msw/gnuwin32/extra.h"
#endif
-#endif // __TWIN32__
-
-#include "wx/msw/dib.h"
#include "wx/app.h" // for GetComCtl32Version
#if defined(__MWERKS__) && defined(__WXMSW__)
return FALSE;
// MSW-specific initialisation
- if ( !MSWCreateToolbar(pos, size, style) )
+ if ( !MSWCreateToolbar(pos, size) )
return FALSE;
// set up the colors and fonts
return TRUE;
}
-bool wxToolBar::MSWCreateToolbar(const wxPoint& pos,
- const wxSize& size,
- long style)
+bool wxToolBar::MSWCreateToolbar(const wxPoint& pos, const wxSize& size)
{
- if ( !MSWCreateControl(TOOLBARCLASSNAME, _T(""), pos, size, style) )
+ if ( !MSWCreateControl(TOOLBARCLASSNAME, wxEmptyString, pos, size) )
return FALSE;
// toolbar-specific post initialisation
UnsubclassWin();
- if ( !MSWCreateToolbar(pos, size, GetWindowStyle()) )
+ if ( !MSWCreateToolbar(pos, size) )
{
// what can we do?
wxFAIL_MSG( _T("recreating the toolbar failed") );
if ( style & wxTB_NOALIGN )
msStyle |= CCS_NOPARENTALIGN;
+ if ( style & wxTB_VERTICAL )
+ msStyle |= CCS_VERT;
+
return msStyle;
}
wxToolBarToolBase *tool = node->GetData();
// don't add separators to the vertical toolbar - looks ugly
- if ( isVertical && tool->IsSeparator() )
- continue;
+ //if ( isVertical && tool->IsSeparator() )
+ // continue;
TBBUTTON& button = buttons[i];
bool wxToolBar::HandleSize(WXWPARAM wParam, WXLPARAM lParam)
{
- // calculate our minor dimenstion ourselves - we're confusing the standard
+ // calculate our minor dimension ourselves - we're confusing the standard
// logic (TB_AUTOSIZE) with our horizontal toolbars and other hacks
RECT r;
if ( ::SendMessage(GetHwnd(), TB_GETITEMRECT, 0, (LPARAM)&r) )