After you have declared a response table, you must define it.
Response table definitions must appear outside the class definition.
ObjectWindows provides the DEFINE_RESPONSE_TABLEX macro to help define response tables. The value of X depends on your class's inheritance and is a number equal to the number of immediate base classes your class has. END_RESPONSE_TABLE ends the event response table definition. To define your response table,
- Begin the response table definition for your class using the DEFINE_RESPONSE_TABLEX macro. DEFINE_RESPONSE_TABLEX takes X + 1 arguments: the name of the class you are defining the response table for and the name of each immediate base class
- Fill in the response table entries
- End the response table definition using the END_RESPONSE_TABLE macro. Example For example, the response table definition for TMyFrame, derived from TFrameWindow, would look like this:
#define END_RESPONSE_TABLE
#define DEFINE_RESPONSE_TABLE1(cls, base)
Macro to define a response table for a class with one base.
#define EV_WM_RBUTTONDOWN
#define EV_WM_LBUTTONDOWN
You must always place a comma after each response table entry and a semicolon after the END_RESPONSE_TABLE macro.
See Also