+
+ // Give it a status line
+ CreateStatusBar();
+
+ // Give it an icon
+ SetIcon(wxICON(mondrian));
+
+ // Make a menubar
+ wxMenu *tbarMenu = new wxMenu;
+ tbarMenu->Append(IDM_TOOLBAR_TOGGLETOOLBAR, "&Toggle toolbar", "Change the toolbar kind");
+ tbarMenu->Append(IDM_TOOLBAR_ENABLEPRINT, "&Enable print button", "");
+ tbarMenu->Append(IDM_TOOLBAR_TOGGLEHELP, "Toggle &help button", "");
+
+ wxMenu *fileMenu = new wxMenu;
+ fileMenu->Append(wxID_EXIT, "E&xit", "Quit toolbar sample" );
+
+ wxMenu *menuMenu = new wxMenu;
+ menuMenu->Append(IDM_MENU_APPEND, "&Append menu");
+ menuMenu->Append(IDM_MENU_DELETE, "&Delete menu");
+ menuMenu->Append(IDM_MENU_TOGGLE, "&Toggle menu", "", TRUE);
+
+ wxMenu *helpMenu = new wxMenu;
+ helpMenu->Append(wxID_HELP, "&About", "About toolbar sample");
+
+ wxMenuBar* menuBar = new wxMenuBar( wxMB_DOCKABLE );
+
+ menuBar->Append(fileMenu, "&File");
+ menuBar->Append(tbarMenu, "&Toolbar");
+ menuBar->Append(menuMenu, "&Menubar");
+ menuBar->Append(helpMenu, "&Help");
+
+ // Associate the menu bar with the frame
+ SetMenuBar(menuBar);
+
+ // Create the toolbar
+ wxToolBar *tbar = CreateToolBar(wxNO_BORDER | wxTB_HORIZONTAL |
+ wxTB_FLAT | wxTB_DOCKABLE,
+ ID_TOOLBAR);
+
+ tbar->SetMargins( 2, 2 );
+
+ wxGetApp().InitToolbar(tbar);