X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce3ed50dbe32d118321082db84c3a9abb047d5b7..c2dcfdef634e097f7efe2288aa13511efb43ae28:/src/msw/tbarmsw.cpp

diff --git a/src/msw/tbarmsw.cpp b/src/msw/tbarmsw.cpp
index 625cfafd02..2e5fdab316 100644
--- a/src/msw/tbarmsw.cpp
+++ b/src/msw/tbarmsw.cpp
@@ -465,12 +465,20 @@ void wxToolBarMSW::Layout(void)
     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);
 }