Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
MFC
TRY
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

ON_EVENT_REFLECT 

The ON_EVENT_REFLECT macro, when used in the event sink map of an OLE control's wrapper class, receives events fired by the control before they are handled by the control's container.


ON_EVENT_REFLECT(theClass, dispid, pfnHandler, vtsParams )

Parameters

theClass

The class to which this event sink map belongs.

dispid

The dispatch ID of the event fired by the control.

pfnHandler

Pointer to a member function that handles the event. This function should have a BOOL return type and parameter types that match the event's parameters (see vtsParams). The function should return TRUE to indicate the event was handled; otherwise FALSE.

vtsParams

A sequence of VTS_ constants that specifies the types of the parameters for the event. These are the same constants that are used in dispatch map entries such as DISP_FUNCTION.

The vtsParams argument is a space-separated list of values from the VTS_ constants.

One or more of these values separated by spaces (not commas) specifies the function's parameter list. For example:

VTS_I2 VTS_BOOL

specifies a list containing a short integer followed by a BOOL.

For a list of the VTS_ constants, see EVENT_CUSTOM.

Community Additions

ADD
Show:
© 2015 Microsoft