]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/toolbar/toolbar.cpp
removed more remains of wxUSE_PENWINDOWS
[wxWidgets.git] / samples / toolbar / toolbar.cpp
index 062d2f7ec818998fc4c86eaa17ab7f6ae4094804..5284572c397d5fa95a514e95438dfe820633e0f4 100644 (file)
@@ -531,8 +531,7 @@ void MyFrame::LayoutChildren()
     int offset;
     if ( m_tbar )
     {
-        m_tbar->SetSize(wxDefaultCoord, size.y);
-        m_tbar->Move(0, 0);
+        m_tbar->SetSize(0, 0, wxDefaultCoord, size.y);
 
         offset = m_tbar->GetSize().x;
     }
@@ -588,7 +587,8 @@ void MyFrame::OnToggleAnotherToolbar(wxCommandEvent& WXUNUSED(event))
     }
     else
     {
-        long style = GetToolBar()->GetWindowStyle();
+        long style = GetToolBar() ? GetToolBar()->GetWindowStyle()
+                                  : TOOLBAR_STYLE;
         style &= ~wxTB_HORIZONTAL;
         style |= wxTB_VERTICAL;