+#if wxUSE_STATUSBAR
+
+void wxFrame::PositionStatusBar()
+{
+ if ( m_frameStatusBar )
+ {
+ wxSize size = GetClientSize();
+ m_frameStatusBar->SetSize(0, size.y, size.x, -1);
+ }
+}
+
+wxStatusBar* wxFrame::CreateStatusBar(int number, long style,
+ wxWindowID id, const wxString& name)
+{
+ wxStatusBar *bar = wxFrameBase::CreateStatusBar(number, style, id, name);
+ SendSizeEvent();
+ return bar;
+}
+
+#endif // wxUSE_STATUSBAR
+
+#if wxUSE_TOOLBAR
+
+wxToolBar* wxFrame::CreateToolBar(long style, wxWindowID id, const wxString& name)
+{
+ if ( wxFrameBase::CreateToolBar(style, id, name) )
+ {
+ PositionToolBar();
+ }
+
+ return m_frameToolBar;
+}
+
+void wxFrame::PositionToolBar()
+{
+ if ( m_frameToolBar )
+ {
+ wxSize size = GetClientSize();
+ int tw, th, tx, ty;
+
+ tx = ty = 0;
+ m_frameToolBar->GetSize(&tw, &th);
+ if ( m_frameToolBar->GetWindowStyleFlag() & wxTB_VERTICAL )
+ {
+ tx = -tw;
+ th = size.y;
+ }
+ else
+ {
+ ty = -th;
+ tw = size.x;
+ }
+
+ m_frameToolBar->SetSize(tx, ty, tw, th);
+ }
+}
+#endif // wxUSE_TOOLBAR
+