OLE controls are able to expose interfaces to other applications. These interfaces only allow access from a container into that control. If an OLE control wants to access external interfaces of other OLE objects, a connection point must be established. This connection point allows a control outgoing access to external dispatch maps, such as event maps or notification functions.
The Microsoft Foundation Class Library offers a programming model that supports connection points. In this model, "connection maps" are used to designate interfaces or connection points for the OLE control. Connection maps contain one macro for each connection point. For more information on connection maps, see the CConnectionPoint class.
Typically, a control will support just two connection points: one for events and one for property notifications. These are implemented by the COleControl base class and require no additional work by the control writer. Any additional connection points you want to implement in your class must be added manually. To support connection maps and points, MFC provides the following macros:
Declares an embedded class that implements an additional connection point (must be used in the class declaration).
Ends the declaration of a connection point (must be used in the class declaration).
Specifies the interface ID of the control's connection point.
Declares that a connection map will be used in a class (must be used in the class declaration).
Begins the definition of a connection map (must be used in the class implementation).
Ends the definition of a connection map (must be used in the class implementation).
Specifies a connection point in the control's connection map.
The following functions assist a sink in establishing and disconnecting a connection using connection points: