+void MyFrame::OnFullScreen(wxCommandEvent& event)
+{
+ ShowFullScreen(event.IsChecked());
+}
+
+void MyFrame::OnChangeMode(wxCommandEvent& event)
+{
+ wxDisplay dpy(m_notebook->GetSelection());
+
+ // you wouldn't write this in real code, would you?
+ if ( !dpy.ChangeMode(((MyVideoModeClientData *)
+ wxDynamicCast(event.GetEventObject(), wxChoice)->
+ GetClientObject(event.GetInt()))->mode) )
+ {
+ wxLogError(_T("Changing video mode failed!"));
+ }
+}
+
+void MyFrame::OnResetMode(wxCommandEvent& WXUNUSED(event))
+{
+ wxDisplay dpy(m_notebook->GetSelection());
+
+ dpy.ResetMode();
+}
+