带有图片的toolbar
wxImage::AddHandler(new wxPNGHandler);
// 增加图片 exit.png
wxBitmap exit(wxT("exit.png"), wxBITMAP_TYPE_PNG);// wxToolBar *toolbar = new wxToolBar(this, wxID_ANY);
wxToolBar *toolbar = CreateToolBar();toolbar->AddTool(wxID_EXIT, wxT("Exit application"), exit);// 实现
toolbar->Realize();Connect(wxID_EXIT, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(Toolbar::OnQuit));
menubar增加menu
menubar = new wxMenuBar;file = new wxMenu;file->Append(wxID_EXIT, wxT("&Quit"));// 增加分割线file->AppendSeparator();// file->AppendSubMenu(wxMenu, wxT("&Import"));// file->Append(wxMenuItem);menubar->Append(file, wxT("&File"));SetMenuBar(menubar);Connect(wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler(SimpleMenu::OnQuit));