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

Because the response table is a member of an ObjectWindows class, you must declare the response table when you define the class.

ObjectWindows provides the DECLARE_RESPONSE_TABLE macro to hide the actual template syntax that response tables use.

The DECLARE_RESPONSE_TABLE macro takes a single argument, the name of the class for which the response table is being declared. Add the macro at the end of your class definition.

Example

TMyFrame, derived from TFrameWindow, would be defined like this:

class TMyFrame : public TFrameWindow
{
.
.
.
};
#define DECLARE_RESPONSE_TABLE(cls)
Definition eventhan.h:436

It does not matter what the access level (public, protected, or private) is at the point where you declare the response table: The DECLARE_RESPONSE_TABLE macro sets up its own access levels when it is expanded by the preprocessor. Because the access level is reset at the point where you declare the response table, you must make the DECLARE_RESPONSE_TABLE macro the last element in your class declaration. Any members declared after the macro will have unpredictable access levels.

See Also