DECLARE_EVENT_TABLE()
};
-enum
-{
- ConfTest_Quit,
- ConfTest_About,
- ConfTest_Delete
-};
-
// ----------------------------------------------------------------------------
// event tables
// ----------------------------------------------------------------------------
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
- EVT_MENU(ConfTest_Quit, MyFrame::OnQuit)
- EVT_MENU(ConfTest_About, MyFrame::OnAbout)
- EVT_MENU(ConfTest_Delete, MyFrame::OnDelete)
+ EVT_MENU(wxID_EXIT, MyFrame::OnQuit)
+ EVT_MENU(wxID_ABOUT, MyFrame::OnAbout)
+ EVT_MENU(wxID_DELETE, MyFrame::OnDelete)
END_EVENT_TABLE()
// ============================================================================
// menu
wxMenu *file_menu = new wxMenu;
- file_menu->Append(ConfTest_Delete, wxT("&Delete"), wxT("Delete config file"));
+ file_menu->Append(wxID_DELETE, wxT("&Delete"), wxT("Delete config file"));
file_menu->AppendSeparator();
- file_menu->Append(ConfTest_About, wxT("&About\tF1"), wxT("About this sample"));
+ file_menu->Append(wxID_ABOUT, wxT("&About\tF1"), wxT("About this sample"));
file_menu->AppendSeparator();
- file_menu->Append(ConfTest_Quit, wxT("E&xit\tAlt-X"), wxT("Exit the program"));
+ file_menu->Append(wxID_EXIT, wxT("E&xit\tAlt-X"), wxT("Exit the program"));
wxMenuBar *menu_bar = new wxMenuBar;
menu_bar->Append(file_menu, wxT("&File"));
SetMenuBar(menu_bar);