+
+ wxPanel *panel = new wxPanel(this, -1);
+ wxButton *button1 = new wxButton( panel, Minimal_StartSimplePopup, wxT("Show simple popup"), wxPoint(20,20) );
+ wxButton *button2 = new wxButton( panel, Minimal_StartScrolledPopup, wxT("Show scrolled popup"), wxPoint(20,70) );
+
+ m_logWin = new wxTextCtrl( panel, wxID_ANY, wxEmptyString, wxDefaultPosition,
+ wxDefaultSize, wxTE_MULTILINE );
+ m_logWin->SetEditable(false);
+ wxLogTextCtrl* logger = new wxLogTextCtrl( m_logWin );
+ m_logOld = logger->SetActiveTarget( logger );
+ logger->SetTimestamp( NULL );
+
+ wxBoxSizer *topSizer = new wxBoxSizer( wxVERTICAL );
+ topSizer->Add( button1, 0, wxALL, 5 );
+ topSizer->Add( button2, 0, wxALL, 5 );
+ topSizer->Add( m_logWin, 1, wxEXPAND|wxALL, 5 );
+
+ panel->SetAutoLayout( true );
+ panel->SetSizer( topSizer );
+
+}
+
+MyFrame::~MyFrame()
+{
+ delete wxLog::SetActiveTarget(m_logOld);