git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41827
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
};
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
};
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
- EVT_MENU(wxID_PLAY, MyFrame::OnPlay)
+ EVT_MENU(ID_PLAY, MyFrame::OnPlay)
EVT_MENU(wxID_STOP, MyFrame::OnStop)
EVT_MENU(wxID_ABOUT, MyFrame::OnAbout)
EVT_MENU(wxID_EXIT, MyFrame::OnQuit)
EVT_MENU(wxID_STOP, MyFrame::OnStop)
EVT_MENU(wxID_ABOUT, MyFrame::OnAbout)
EVT_MENU(wxID_EXIT, MyFrame::OnQuit)
file_menu->Append(wxID_EXIT);
wxMenu *play_menu = new wxMenu;
file_menu->Append(wxID_EXIT);
wxMenu *play_menu = new wxMenu;
- play_menu->Append(wxID_PLAY, _T("Play\tCtrl+P"), _T("Play the animation"));
+ play_menu->Append(ID_PLAY, _T("Play\tCtrl+P"), _T("Play the animation"));
play_menu->Append(wxID_STOP, _T("Stop\tCtrl+P"), _T("Stop the animation"));
wxMenu *help_menu = new wxMenu;
play_menu->Append(wxID_STOP, _T("Stop\tCtrl+P"), _T("Stop the animation"));
wxMenu *help_menu = new wxMenu;
void MyFrame::OnUpdateUI(wxUpdateUIEvent& WXUNUSED(event) )
{
GetMenuBar()->FindItem(wxID_STOP)->Enable(m_animationCtrl->IsPlaying());
void MyFrame::OnUpdateUI(wxUpdateUIEvent& WXUNUSED(event) )
{
GetMenuBar()->FindItem(wxID_STOP)->Enable(m_animationCtrl->IsPlaying());
- GetMenuBar()->FindItem(wxID_PLAY)->Enable(!m_animationCtrl->IsPlaying());
+ GetMenuBar()->FindItem(ID_PLAY)->Enable(!m_animationCtrl->IsPlaying());
}
// ---------------------------------------------------------------------------
}
// ---------------------------------------------------------------------------