#include #include #include class myApp : public wxApp { public: bool OnInit(void); int OnExit(void); }; IMPLEMENT_APP(myApp) bool myApp :: OnInit(){ wxFrame *frame = new wxFrame(NULL, wxID_ANY, wxT("blah blah")); wxBoxSizer *sizer = new wxBoxSizer( wxHORIZONTAL ); wxNotebook *notebook = new wxNotebook(frame, wxID_ANY); // add some tab notebook->AddPage(new wxPanel(notebook), wxT("tab")); // create second tab // create panel for this tab wxPanel *panel = new wxPanel(notebook); // add it to the notebook notebook->AddPage(panel, wxT("tab2")); // create sizer for panel wxBoxSizer *panelSizer = new wxBoxSizer( wxHORIZONTAL ); // and add it to the panel panel->SetSizer(panelSizer); // create grid wxGrid *grid = new wxGrid(panel, wxID_ANY); // fill grid with some cells grid->CreateGrid(500, 10); // add grid to the panel size with all possible expandings panelSizer->Add(grid, 1, wxEXPAND | wxALL); grid->Fit(); // add notebook to the main frame's sizer sizer->Add(notebook, 1, wxEXPAND | wxALL); frame->SetSizer(sizer); frame->Show(true); this->SetTopWindow(frame); return true; } int myApp :: OnExit(){ return 0; }