]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/framecmn.cpp
Warning fixes for wxUSE_STL=1.
[wxWidgets.git] / src / common / framecmn.cpp
index 2ab0ab0fa36abc5b552937aa64255a9cfeb1b4a8..3641dec49e823f42ec1a6364cdb8afcb75e68279 100644 (file)
@@ -386,6 +386,18 @@ wxToolBar* wxFrameBase::CreateToolBar(long style,
     wxCHECK_MSG( !m_frameToolBar, (wxToolBar *)NULL,
                  wxT("recreating toolbar in wxFrame") );
 
+    if ( style == -1 )
+    {
+        // use default style
+        //
+        // NB: we don't specify the default value in the method declaration
+        //     because
+        //      a) this allows us to have different defaults for different
+        //         platforms (even if we don't have them right now)
+        //      b) we don't need to include wx/toolbar.h in the header then
+        style = wxBORDER_NONE | wxTB_HORIZONTAL | wxTB_FLAT;
+    }
+
     m_frameToolBar = OnCreateToolBar(style, id, name);
 
     return m_frameToolBar;