title: wxButtonClick don't give a sign of being alife
body: <p>Yesterday, I have posted a question on <code>Creating a pointer to a widget in a function</code>, after I  compiled the program and tried to use it, but when I click on the button, nothing happens.</p>
  
  <p>Maybe, somewhere know where my failure is, or know some improvement of my code, that just can help. My code:</p>
  
  <p><strong>gui.h</strong></p>
  
  <pre><code>#include &lt;wx/wx.h&gt;
  #include &lt;string&gt;
  
  class wxWCK : public wxFrame
  {
  public:
      wxWCK(const wxString&amp; title);
  
      void OnClickCon(wxCommandEvent&amp; event);
      void OnClickSta(wxCommandEvent&amp; event);
  
  private:
      wxButton *connect;
      wxButton *start;
      wxTextCtrl *text;
  };
  
  const int ID_CON = wxID_HIGHEST + 1;
  const int ID_STA = wxID_HIGHEST + 2;
  const int ID_MF0 = 102;
  const int ID_TEX = 103;
  
  void Connect();
  void Start();
  </code></pre>
  
  <p><strong>gui.cpp</strong></p>
  
  <pre><code>#include "gui.h"
  
  wxWCK::wxWCK(const wxString&amp; title)
      : wxFrame(NULL, ID_MF0, title, wxDefaultPosition, wxSize(400,300))
  {
      wxPanel *panel = new wxPanel(this, -1);
  
      wxBoxSizer *vbox  = new wxBoxSizer(wxVERTICAL);
      wxBoxSizer *hbox1 = new wxBoxSizer(wxHORIZONTAL);
      wxBoxSizer *hbox2 = new wxBoxSizer(wxHORIZONTAL);   
  
      //Outputwidget
      text = new wxTextCtrl(panel, ID_TEX, _T(""), 
          wxPoint(-1, -1), wxSize(1000, 1000), wxTE_MULTILINE);
  
      //redirecting stream to the outputwidget
      std::ostream stream(text);  
      stream &lt;&lt; "Hello" &lt;&lt; std::endl;
  
      connect = new wxButton(panel, ID_CON, _T("Connect"));
      start   = new wxButton(panel, ID_STA, _T("Start"));
  
      hbox1-&gt;Add(text);
      hbox2-&gt;Add(connect);
      hbox2-&gt;Add(start);
  
      vbox-&gt;Add(hbox1, 1, wxEXPAND);
      vbox-&gt;Add(hbox2, 0, wxALIGN_LEFT | wxRIGHT | wxBOTTOM, 10);
  
      panel-&gt;SetSizer(vbox);
  
      Connect(ID_CON, wxEVT_COMMAND_BUTTON_CLICKED,
          wxCommandEventHandler(wxWCK::OnClickCon));
      //Connect(ID_STA, wxEVT_COMMAND_BUTTON_CLICKED,
      //  wxCommandEventHandler(wxWCK::OnClickSta));
  }
  
  void wxWCK::OnClickCon(wxCommandEvent&amp; WXUNUSED(event))
  {   void Connect(); }
  
  void wxWCK::OnClickSta(wxCommandEvent&amp; WXUNUSED(event))
  {   void Start();   }
  
  void Connect()
  {
      //Try to get a pointer to 'text'
      std::ostream stream((wxTextCtrl*) wxWindow::FindWindowById(ID_TEX));
      std::string con = "Connected";
      stream &lt;&lt; con &lt;&lt; std::endl;
  }
  
  void Start()
  {
      //Try to get a pointer to 'text'
      std::ostream stream((wxTextCtrl*) wxWindow::FindWindowById(ID_TEX));
      std::string sta = "Started";
      stream &lt;&lt; sta &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p><em>I'm using wxWidgets 2.9.4, the g++-Compiler and CodeLite 5.1</em></p>