## 27.5 Event Handling

- We will now attach actions to the menu items.
- Define a function for each action.

  >     void EventFrame::OnSayHello(wxCommandEvent& event)

  >     {
  >        text->AppendText("Hello, World!\n");
  >     }

- We want this function to run whenever the program user selects the menu option.
- All event handler functions have a parameter that describes the triggering event.
- You must declare the function this way or get a bewildering error message (note that the parameter is not used in the function).

prev |top |next