This should fix VC6 build broken by addition of this sample as VC6 doesn't
support Bind(). Luckily, there is no need to use it here anyhow.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63680
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#include "../sample.xpm"
#endif
#include "../sample.xpm"
#endif
+// ----------------------------------------------------------------------------
+// constants
+// ----------------------------------------------------------------------------
+
+// IDs for the controls and the menu commands
+enum
+{
+ // menu items
+ TheButton = 100,
+ RunSimulation
+};
+
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
private:
bool m_buttonPressed;
bool m_menuSelected;
private:
bool m_buttonPressed;
bool m_menuSelected;
-// ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-// IDs for the controls and the menu commands
-enum
-{
- // menu items
- TheButton = wxID_ANY,
- RunSimulation = wxID_ANY
+BEGIN_EVENT_TABLE(MyFrame, wxFrame)
+ EVT_BUTTON(TheButton, MyFrame::OnButtonPressed)
+ EVT_MENU(RunSimulation, MyFrame::OnRunSimulation)
+END_EVENT_TABLE()
// ============================================================================
// implementation
// ============================================================================
// implementation
// the application class
// ----------------------------------------------------------------------------
// the application class
// ----------------------------------------------------------------------------
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
wxButton* button = new wxButton(this, TheButton, "Button");
button->SetName("TheButton");
wxButton* button = new wxButton(this, TheButton, "Button");
button->SetName("TheButton");
- Bind(wxEVT_COMMAND_BUTTON_CLICKED, &MyFrame::OnButtonPressed, this, button->GetId());
- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::OnRunSimulation, this, RunSimulation);