In addition to providing properties and methods, a control also provides outgoing interfaces to notify its client of events. The client must support handling of these events. See the Connectable Objects chapter for more information on how connectable objects work.
A control can support different outgoing interfaces for different purposes. All outgoing interfaces are marked as source interfaces in the control's type information, but only one is marked default to indicate that it is the primary outgoing interface.
A container can support one or more of the outgoing interfaces defined by a control. The control should be prepared to deal with containers that only provide support for some of their outgoing interfaces.
Controls support four kinds of events:
The following dispids are defined for standard events that controls can support: Click, DblClick, KeyDown, KeyPress, KeyUp, MouseMove, MouseUp, and Error. All of these standard events have negative DISPID values, indicating their standard status.
The IOleControl::FreezeEvents method, when called with TRUE, tells a control whether the container will bother handling events from the control until FreezeEvents is again called with FALSE. During this time control cannot depend on the container actually handling any events. If an event must be handled, the control should queue the event in order to fire it when FreezeEvents(FALSE) is called.