- const wxSize& size, long style):
- wxFrame(frame, -1, title, pos, size, style)
+ const wxSize& size, long style)
+ : wxFrame(frame, wxID_ANY, title, pos, size, style)
+{
+ SetIcon(wxIcon(sample_xpm));
+
+ // Make the "File" menu
+ wxMenu *fileMenu = new wxMenu;
+ fileMenu->Append(wxID_OPEN, wxT("&Open..."));
+ fileMenu->AppendSeparator();
+ fileMenu->Append(wxID_EXIT, wxT("E&xit\tALT-X"));
+ // Make the "Help" menu
+ wxMenu *helpMenu = new wxMenu;
+ helpMenu->Append(wxID_HELP, wxT("&About..."));
+
+ wxMenuBar *menuBar = new wxMenuBar;
+ menuBar->Append(fileMenu, wxT("&File"));
+ menuBar->Append(helpMenu, wxT("&Help"));
+ SetMenuBar(menuBar);
+
+ Show(true);
+
+ m_canvas = new TestGLCanvas(this, wxID_ANY, wxDefaultPosition,
+ GetClientSize(), wxSUNKEN_BORDER);
+}
+
+// File|Open... command
+void MyFrame::OnMenuFileOpen( wxCommandEvent& WXUNUSED(event) )