]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/tbar95.cpp
allow wxPopupWindow get the key events (patch 713269)
[wxWidgets.git] / src / msw / tbar95.cpp
index 59747b11a9b49e74ecbc04c6b90dea51e8d3d532..12c96131168bba5b50c23a805bcb4f875f302f7a 100644 (file)
 
 #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__)
@@ -250,7 +245,7 @@ bool wxToolBar::Create(wxWindow *parent,
 
 bool wxToolBar::MSWCreateToolbar(const wxPoint& pos, const wxSize& size)
 {
-    if ( !MSWCreateControl(TOOLBARCLASSNAME, _T(""), pos, size) )
+    if ( !MSWCreateControl(TOOLBARCLASSNAME, wxEmptyString, pos, size) )
         return FALSE;
 
     // toolbar-specific post initialisation
@@ -366,6 +361,9 @@ WXDWORD wxToolBar::MSWGetStyle(long style, WXDWORD *exstyle) const
     if ( style & wxTB_NOALIGN )
         msStyle |= CCS_NOPARENTALIGN;
 
+    if ( style & wxTB_VERTICAL )
+        msStyle |= CCS_VERT;
+
     return msStyle;
 }
 
@@ -657,8 +655,8 @@ bool wxToolBar::Realize()
         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];
 
@@ -1167,7 +1165,7 @@ void wxToolBar::OnMouseEvent(wxMouseEvent& event)
 
 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) )