Question: Instructions Up until now all events have been configured using the this->Bind method. This is useful, or even necessary, in some instances, but for code

Instructions

  1. Up until now all events have been configured using the this->Bind method. This is useful, or even necessary, in some instances, but for code readability most events should be configured in an event table.
  2. Add the macrowxDECLARE_EVENT_TABLE(); to the main window header file below the all the methods that have been declared.
  3. At the top of the main window cpp file, below the #include entries, is where the event table will be declared. See below for an example of how the event table should look.
  4. The first event to move to the event table is the size change event.
  5. The same steps will need to be repeated for the drawing panel. The PAINT and LEFT_UP events can be move into the drawing panel event table.

C++

wxBEGIN_EVENT_TABLE(MainWindow, wxFrame)
 EVT_SIZE(MainWindow::OnResize)
wxEND_EVENT_TABLE()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!