+private:
+ bool m_uploadReport;
+
+ DECLARE_NO_COPY_CLASS(MyApp)
+};
+
+IMPLEMENT_APP(MyApp)
+
+// ============================================================================
+// implementation
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// MyFrame
+// ----------------------------------------------------------------------------
+
+BEGIN_EVENT_TABLE(MyFrame, wxFrame)
+ EVT_MENU(DebugRpt_Quit, MyFrame::OnQuit)
+ EVT_MENU(DebugRpt_Crash, MyFrame::OnReportForCrash)
+ EVT_MENU(DebugRpt_Current, MyFrame::OnReportForCurrent)
+ EVT_MENU(DebugRpt_Upload, MyFrame::OnReportUpload)
+ EVT_MENU(DebugRpt_About, MyFrame::OnAbout)
+END_EVENT_TABLE()
+
+MyFrame::MyFrame()
+ : wxFrame(NULL, wxID_ANY, _T("wxWidgets Debug Report Sample"))
+{
+ SetIcon(wxICON(sample));
+
+ wxMenu *menuFile = new wxMenu;
+ menuFile->Append(DebugRpt_Quit, _T("E&xit\tAlt-X"));
+
+ wxMenu *menuReport = new wxMenu;
+ menuReport->Append(DebugRpt_Crash, _T("Report for &crash\tCtrl-C"),
+ _T("Provoke a crash inside the program and create report for it"));
+ menuReport->Append(DebugRpt_Current, _T("Report for c&urrent context\tCtrl-U"),
+ _T("Create report for the current program context"));
+ menuReport->AppendSeparator();
+ menuReport->AppendCheckItem(DebugRpt_Upload, _T("Up&load debug report"),
+ _T("You need to configure a web server accepting debug report uploads to use this function"));
+
+ wxMenu *menuHelp = new wxMenu;
+ menuHelp->Append(DebugRpt_About, _T("&About...\tF1"));
+
+ wxMenuBar *mbar = new wxMenuBar();
+ mbar->Append(menuFile, _T("&File"));
+ mbar->Append(menuReport, _T("&Report"));
+ mbar->Append(menuHelp, _T("&Help"));
+ SetMenuBar(mbar);