This class provides methods for supporting stock property values.
template < class T, class InterfaceName, const IID* piid = &_ATL_IIDOF(InterfaceName), const GUID* plibid = &CComModule::m_libid, WORD wMajor = 1, WORD wMinor = 0, class tihclass = CcomTypeInfoHolder > class ATL_NO_VTABLE CStockPropImpl : public IDispatchImpl< InterfaceName, piid, plibid, wMajor, wMinor, tihclass >
CStockPropImpl provides put and get methods for each stock property. These methods provide the code necessary to set or get the data member associated with each property and to notify and synchronize with the container when any property changes.
Visual C++ provides support for stock properties through its wizards. For more information about adding stock properties to a control, see the ATL Tutorial.
For backward compatibility, CStockPropImpl also exposes get_Window and put_Window methods that simply call get_HWND and put_HWND, respectively. The default implementation of put_HWND returns E_FAIL since HWND should be a read-only property.
The following properties also have a putref implementation:
The same three stock properties require their corresponding data member to be of type CComPtr or some other class that provides correct interface reference counting by means of the assignment operator.