Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 1.61 KB

adding-functionality-to-the-composite-control.md

File metadata and controls

27 lines (18 loc) · 1.61 KB
description title ms.date helpviewer_keywords ms.assetid
Learn more about: Adding Functionality to the Composite Control
Adding Functionality to the Composite Control
11/04/2016
event handlers [C++], ActiveX controls
composite controls, handling events
ActiveX controls [C++], events
98f85681-9564-480d-af38-03f9733fe58b

Adding Functionality to the Composite Control

Once you have inserted any necessary controls into the composite control, the next step involves adding new functionality. This new functionality usually falls into two categories:

  • Supporting additional interfaces and customizing the behavior of your composite control with additional, specific features.

  • Handling events from the contained ActiveX control (or controls).

For the purpose and scope of this article, the remainder of this section focuses solely on handling events from ActiveX controls.

Note

If you need to handle messages from Windows controls, see Implementing a Window for more information on message handling in ATL.

After inserting an ActiveX control in the dialog resource, right-click the control and click Add Event Handler. Select the event you want to handle and click Add and Edit. The event handler code will be added to the control's .h file.

Connection points for ActiveX controls on the composite control are automatically connected and disconnected via calls to CComCompositeControl::AdviseSinkMap.

See also

Composite Control Fundamentals