Created
May 16, 2020 09:07
-
-
Save PBfordev/8fba974627324bea0beeb46b8095af92 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <wx/wx.h> | |
#include <wx/artprov.h> | |
class MyApp : public wxApp | |
{ | |
public: | |
bool OnInit() override | |
{ | |
wxFrame* f = new wxFrame(nullptr, wxID_ANY, "Toolbar test"); | |
wxPanel* p = new wxPanel(f); | |
p->SetBackgroundColour(*wxRED); | |
for ( size_t i = 0; i < 2; ++i ) | |
{ | |
wxToolBar* toolBar = new wxToolBar(f, wxID_ANY); | |
toolBar->AddTool(wxID_ABOUT, "", wxArtProvider::GetBitmap(wxART_INFORMATION, wxART_TOOLBAR)); | |
toolBar->Realize(); | |
f->SetToolBar(toolBar); | |
} | |
f->Show(); | |
return true; | |
} | |
}; wxIMPLEMENT_APP(MyApp); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment