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

If you want child ID notifications to be handled at the child's parent window, use EV_CHILD_NOTIFY, which passes the notification code as a parameter and lets multiple child ID notifications be handled with a single function.

This macro also saves you from having to handle each child's notification message in separate response tables for each control. Instead, each message is handled at the parent, enabling, for example, a dialog box to handle all its controls in its response table.

Examples

Suppose you have a dialog box called TTestDialog that has four buttons. The buttons IDs are ID_BUTTON1, ID_BUTTON2, ID_BUTTON3, and ID_BUTTON4. When the user clicks a button, you want a single function to handle the event, regardless of which button was pressed. If the user double-clicks a button, you want a special function to handle the event. The code looks like this:

class TTestDialog : public TDialog {
public:
TTestDialog(TWindow* parent, TResId resId);
void HandleClick();
};
TDialog)
#define DECLARE_RESPONSE_TABLE(cls)
Definition eventhan.h:436
#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_CHILD_NOTIFY(id, notifyCode, method)
Response table entry for a child ID notification handled at the child's parent.
Definition windowev.h:131

See Also