- if (GetEventHandler()->ProcessEvent(event))
- {
- if (event.GetSetText())
- menu->SetLabel(id, event.GetText());
- if (event.GetSetChecked())
- menu->Check(id, event.GetChecked());
- if (event.GetSetEnabled())
- menu->Enable(id, event.GetEnabled());
- }
+ if (GetToolBar())
+ {
+ int tw, th;
+ GetToolBar()->GetSize(& tw, & th);
+
+ if (GetToolBar()->GetWindowStyleFlag() & wxTB_VERTICAL)
+ {
+ // Use the 'real' MSW position
+ GetToolBar()->SetSize(0, 0, tw, rect.bottom, wxSIZE_NO_ADJUSTMENTS);
+ }
+ else
+ {
+ // Use the 'real' MSW position
+ GetToolBar()->SetSize(0, 0, rect.right, th, wxSIZE_NO_ADJUSTMENTS);
+ }
+ }
+}