CStockPropImpl

template < class T, class InterfaceName, const IID* piid, const GUID* plibid >
class CStockPropImpl : IDispatchImpl<
InterfaceName, piid, plibid >

Parameters

T

The class implementing the control.

InterfaceName

A dual interface.

piid

A pointer to the IID of InterfaceName.

plibid

A pointer to the identifier of GUID of the type library section of InterfaceName.

CStockPropImpl implements every stock property you can choose from the Stock Properties tab in the ATL Object Wizard. The Object Wizard automatically creates a data member in your control class for each property, creates put and get methods for each property, and adds code to notify and synchronize with the container when any property changes.

The ATL Object Wizard can also be used to implement any or all of the stock properties in the same manner. For more information about adding stock properties to a control, see the ATL Tutorial. For more information about the ATL Object Wizard, see the article Creating an ATL Project.

CStockPropImpl implements put and get methods for the stock properties that are interface pointers, including FONT, MOUSEICON, and PICTURE. For all other stock properties, CStockPropImpl calls the macros IMPLEMENT_STOCKPROP, IMPLEMENT_BOOL_STOCKPROP , and IMPLEMENT_BSTR_STOCKPROP.

The following table lists the stock properties implemented and the data members created by CStockPropImpl. See the data members in CComControl for a description of each property, except HWND, whose data member is described in CWindow.

Stock Property Data Member
APPEARANCE m_nAppearance
AUTOSIZE m_bAutoSize
BACKCOLOR m_clrBackColor
BACKSTYLE m_nBackStyle
BORDERCOLOR m_clrBorderColor
BORDERSTYLE m_nBorderStyle
BORDERVISIBLE m_bBorderVisible
BORDERWIDTH m_nBorderWidth
CAPTION m_bstrCaption
DRAWMODE m_nDrawMode
DRAWSTYLE m_nDrawStyle
DRAWWIDTH m_nDrawWidth
ENABLED m_bEnabled
FILLCOLOR m_clrFillColor
FILLSTYLE m_nFillStyle
FONT m_pFont
FORECOLOR m_clrForeColor
HWND m_hWnd
MOUSEICON m_pMouseIcon
MOUSEPOINTER m_nMousePointer
PICTURE m_pPicture
READYSTATE m_nReadyState
TABSTOP m_bTabStop
TEXT m_bstrText
VALID m_bValid

#include <atlctl.h>