- GetClientSize(&client_x, &client_y);
- child->SetSize(0, 0, client_x, client_y);
+ int x = 0;
+ int y = 0;
+
+ // Manage the toolbar if there is one
+ if ( GetToolBar() )
+ {
+ int wt, ht;
+ GetToolBar()->GetSize(&wt, &ht);
+ clientH -= ht;
+ y += ht;
+ GetToolBar()->SetSize(0, 0, clientW, ht);
+ }
+
+ child->SetSize(x, y, clientW, clientH);