1. #include <wx/frame.h>
  2. #include <wx/aui/aui.h>
  3. #include <wx/stattext.h>
  4.  
  5. ///////////////////////////////
  6. class MyWindow: public wxPanel
  7. {
  8. public:
  9. MyWindow(wxWindow *parent, const wxString& title);
  10. ~MyWindow(){}
  11. };
  12.  
  13.  
  14. //////////////////////////////
  15. class MyFrame: public wxFrame
  16. {
  17. public:
  18. MyFrame(wxFrame *frame, const wxString& title);
  19. ~MyFrame(){ manager.UnInit(); }
  20.  
  21. wxAuiManager manager;
  22. };
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30. // MyFrame ////////////////////////////////
  31. MyFrame::MyFrame(wxFrame *frame, const wxString& title)
  32. : wxFrame(frame, -1, title, wxDefaultPosition, wxSize(800, 570), wxDEFAULT_FRAME_STYLE)
  33. {
  34. manager.SetManagedWindow(this);
  35.  
  36. MyWindow *window1 = new MyWindow(this, wxString("Main Window"));
  37. manager.AddPane(window1, wxLEFT, wxT("the main window"));
  38.  
  39. manager.Update();
  40. }
  41.  
  42.  
  43. // MyWindow ///////////////////////////
  44. MyWindow::MyWindow(wxWindow *parent, const wxString& title)
  45. : wxPanel(parent, -1, wxDefaultPosition, wxSize(100, 100), wxNO_BORDER, title)
  46. {
  47. wxStaticText *text = new wxStaticText(this, -1, wxString("This is static text in my first window. "), wxDefaultPosition, wxDefaultSize, 0, wxString("staticText"));
  48. }
  49.  
  50.  
  51.  
  52.