ATL-based Template Classes and Macros

In many cases, the Properties palette API provides ATL-based template classes that implement its COM interfaces. A template implementation may implement IDispatch as well as several Properties palette COM interfaces, or it may implement a single, specialized object. Some template classes implement all methods of their interfaces, whereas others leave part of the implementation to you. In most cases, though, deriving from a template class requires far less coding than directly implementing the underlying interfaces.

Properties palette template classes are defined in the axtempl.h file. The template classes and the interfaces they implement, either wholly or in part, are shown in the following table.

Properties Palette Template Classes 

 

Template Class

Implemented Interfaces

IOPMPropertyExtensionImpl

ICategorizeProperties, IPerPropertyBrowsing, IOPMPropertyExtension

IOPMPropertyExtensionImpl2

IPerPropertyBrowsing, IOPMPropertyExtension

Some of these templates work with mapping macros. Mapping macros let you specify custom information in a list format, with no need to implement the underlying pure virtual interfaces. This mechanism simplifies the process of coding Properties palette applications. Mapping macros for the following template classes are declared in the opmimp.h file: