title: Where is program entry point
body: <p>I have simple windows form application that is using exWidgets. By looking at this type of programms that are using forms and object oriented programming I always have question - where is program entry point? Where is <code>main</code>?</p>
  
  <pre><code>#include "wx/wx.h" 
  
  class MyApp: public wxApp
  {
      virtual bool OnInit();
  };
  
  class MyFrame: public wxFrame
  {
  public:
  
      MyFrame(const wxString&amp; title, const wxPoint&amp; pos, const wxSize&amp; size);
  
      void OnQuit(wxCommandEvent&amp; event);
      void OnAbout(wxCommandEvent&amp; event);
  
      DECLARE_EVENT_TABLE()
  };
  
  enum
  {
      ID_Quit = 1,
      ID_About,
  };
  
  BEGIN_EVENT_TABLE(MyFrame, wxFrame)
      EVT_MENU(ID_Quit, MyFrame::OnQuit)
      EVT_MENU(ID_About, MyFrame::OnAbout)
  END_EVENT_TABLE()
  
  IMPLEMENT_APP(MyApp)
  
  bool MyApp::OnInit()
  {
      MyFrame *frame = new MyFrame( "Hello World", wxPoint(50,50), wxSize(450,340) );
      frame-&gt;Show(TRUE);
      SetTopWindow(frame);
      return TRUE;
  } 
  
  MyFrame::MyFrame(const wxString&amp; title, const wxPoint&amp; pos, const wxSize&amp; size)
  : wxFrame((wxFrame *)NULL, -1, title, pos, size)
  {
      wxMenu *menuFile = new wxMenu;
  
      menuFile-&gt;Append( ID_About, "&amp;About..." );
      menuFile-&gt;AppendSeparator();
      menuFile-&gt;Append( ID_Quit, "E&amp;xit" );
  
      wxMenuBar *menuBar = new wxMenuBar;
      menuBar-&gt;Append( menuFile, "&amp;File" );
  
      SetMenuBar( menuBar );
  
      CreateStatusBar();
      SetStatusText( "Welcome to wxWindows!" );
  }
  
  void MyFrame::OnQuit(wxCommandEvent&amp; WXUNUSED(event))
  {
      Close(TRUE);
  }
  
  void MyFrame::OnAbout(wxCommandEvent&amp; WXUNUSED(event))
  {
      wxMessageBox("This is a wxWindows Hello world sample",
          "About Hello World", wxOK | wxICON_INFORMATION, this);
  }
  </code></pre>