+void TextWidgetsPage::OnStreamRedirector(wxCommandEvent& WXUNUSED(event))
+{
+#if wxHAS_TEXT_WINDOW_STREAM
+ wxStreamToTextRedirector redirect(m_text);
+ wxString str( wxT("Outputed to cout, appears in wxTextCtrl!") );
+ wxSTD cout << str << wxSTD endl;
+#else
+ wxMessageBox(wxT("This wxWidgets build does not support wxStreamToTextRedirector"));
+#endif
+}