Udostępnij za pośrednictwem


Adding an Event Using Attributes

Events allow an ActiveX control to communicate important information to its container. Using attributes, adding an event is a simple matter. For detailed information on adding and firing events from an ATL control, see Event Handling in COM.

Conclusion

In the past, implementing the standard features of an ActiveX control could be a tedious task. However, using the attributed programming model, the various wizards of Visual C++, and the Visual C++ compiler itself, implementing a basic ActiveX control now requires little effort, and makes use of code that has been tested and optimized by the Visual C++ team.

See Also

Tasks

Adding a Property Using Attributes

Concepts

Walkthrough: Creating an ActiveX Control with Attributes

Creating the ActiveX Control Project

Inserting the ATL Control Component

Other Resources

Attributes Walkthroughs