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. CStockPropImpl 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 the ATL Object Wizard, see the article Creating an ATL Project.

CStockPropImpl implements all the stock properties by calling the IMPLEMENT_STOCKPROP, IMPLEMENT_BSTR_STOCKPROP, and IMPLEMENT_SMARTPTR_STOCKPROP macros.

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
APPEARANCEm_nAppearance
AUTOSIZE m_bAutoSize
BACKCOLORm_clrBackColor
BACKSTYLEm_nBackStyle
BORDERCOLORm_clrBorderColor
BORDERSTYLEm_nBorderStyle
BORDERVISIBLEm_bBorderVisible
BORDERWIDTH m_nBorderWidth
CAPTIONm_bstrCaption
DRAWMODEm_nDrawMode
DRAWSTYLEm_nDrawStyle
DRAWWIDTHm_nDrawWidth
ENABLEDm_bEnabled
FILLCOLORm_clrFillColor
FILLSTYLEm_nFillStyle
FONTm_pFont
FORECOLORm_clrForeColor
HWNDm_hWnd
MOUSEICONm_pMouseIcon
MOUSEPOINTERm_nMousePointer
PICTUREm_pPicture
READYSTATEm_nReadyState
TABSTOP m_bTabStop
TEXTm_bstrText
VALIDm_bValid

#include <atlctl.h>