X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d956f3e7e79b05d788a0763e2b424a2541367825..18666b42ca62c24cb3097c32b5108f57bbb7eec6:/samples/xrc/myframe.cpp?ds=sidebyside diff --git a/samples/xrc/myframe.cpp b/samples/xrc/myframe.cpp index 546667440c..3a6453d3e8 100644 --- a/samples/xrc/myframe.cpp +++ b/samples/xrc/myframe.cpp @@ -78,8 +78,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(XRCID("unload_resource_menuitem"), MyFrame::OnUnloadResourceMenuCommand) EVT_MENU(XRCID("reload_resource_menuitem"), MyFrame::OnReloadResourceMenuCommand) - EVT_MENU(XRCID("exit_tool_or_menuitem"), MyFrame::OnExitToolOrMenuCommand) - EVT_MENU(XRCID("exit_tool_or_menuitem"), MyFrame::OnExitToolOrMenuCommand) + EVT_MENU(wxID_EXIT, MyFrame::OnExitToolOrMenuCommand) EVT_MENU(XRCID("non_derived_dialog_tool_or_menuitem"), MyFrame::OnNonDerivedDialogToolOrMenuCommand) EVT_MENU(XRCID("derived_tool_or_menuitem"), MyFrame::OnDerivedDialogToolOrMenuCommand) EVT_MENU(XRCID("controls_tool_or_menuitem"), MyFrame::OnControlsToolOrMenuCommand) @@ -88,7 +87,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(XRCID("platform_property_tool_or_menuitem"), MyFrame::OnPlatformPropertyToolOrMenuCommand) EVT_MENU(XRCID("art_provider_tool_or_menuitem"), MyFrame::OnArtProviderToolOrMenuCommand) EVT_MENU(XRCID("variable_expansion_tool_or_menuitem"), MyFrame::OnVariableExpansionToolOrMenuCommand) - EVT_MENU(XRCID("about_tool_or_menuitem"), MyFrame::OnAboutToolOrMenuCommand) + EVT_MENU(wxID_ABOUT, MyFrame::OnAboutToolOrMenuCommand) END_EVENT_TABLE() //----------------------------------------------------------------------------- @@ -194,8 +193,10 @@ void MyFrame::OnAnimationCtrlPlay(wxCommandEvent& event) } else { - ctrl->Play(); - btn->SetLabel(wxT("Stop")); + if (ctrl->Play()) + btn->SetLabel(wxT("Stop")); + else + wxLogError(wxT("Cannot play the animation...")); } #endif }