OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Defining Response Tables

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,

  1. 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
  2. Fill in the response table entries
  3. 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
    Definition eventhan.h:466
    #define DEFINE_RESPONSE_TABLE1(cls, base)
    Macro to define a response table for a class with one base.
    Definition eventhan.h:492
    #define EV_WM_RBUTTONDOWN
    Definition windowev.h:368
    #define EV_WM_LBUTTONUP
    Definition windowev.h:314
    #define EV_WM_MOUSEMOVE
    Definition windowev.h:329
    #define EV_WM_LBUTTONDOWN
    Definition windowev.h:313
    You must always place a comma after each response table entry and a semicolon after the END_RESPONSE_TABLE macro.

See Also