次の方法で共有


Adding Methods, Properties, and Events to MFC ActiveX Controls

OverviewHow Do I ... Topics

When you add methods, properties, or events to ActiveX controls, you can choose from a list of standard, or “stock,” items as defined in the Microsoft Foundation Class (MFC) library. Adding a stock item creates a definition in the .odl file for the item.

You can also customize a stock method, property, or event. For example, you might create a custom implementation for a double-click event. When you do so, Visual C++ creates stub implementation code in the .cpp and .h files for the custom method or property; for customized events, Visual C++ creates an inline event handler in the .h file. This is also the case when you create your own property, method, or event, without starting from a stock item.

What do you want to do?

Add a method to an MFC ActiveX control

Add a property to an MFC ActiveX control

Add an event to an MFC ActiveX control