CAxProperty Class

class CAxProperty: public IProperty

This class implements the  IProperty for ActiveX control properties. Rather than make a copy of property data such as name and description, this class maintains a pointer to the ActiveX control and the dispatch ID for the property. It implements the IProperty interface by using IDispatch interface.

Defined in: AxProperty.h

Class Members

CAxProperty()

Construct an ActiveX property

ULONG m_ulRefCount

Reference count

DISPID m_dispId

Dispatch ID of property

ITypeInfo* m_pTypeInfo

Pointer to dispatch interface of ActiveX control

int m_subType

type info of user defined type (can be NULL)

int m_subType

Sub-type

_bstr_t m_name

Property name

_bstr_t m_desc

Property description

IEnumeration* m_pEnumeration

Pointer to enumerated values

bool  Initialize(IDispatch* pDisp, DISPID di, BSTR bstrName, BSTR bstrDesc, ITypeInfo* pTypeInfo = NULL)

Initialize the property using ActiveX control information.

virtual PropertyId  GetId() const

Get the ID of the property.

virtual VARTYPE  GetVariantType() const

Get the variant type of the property.

virtual DWORD  GetStyleFlags() const

Get the style flags for the property.

virtual void  GetName(BSTR& bName) const

Get the name of the property.

virtual void  GetDescription(BSTR& bDesc) const

Get the description of the property.

virtual int  GetCategory() const

Get the category of the property.

virtual IEnumeration*  GetEnumeration() const

Get the enumeration for the property.

bool  IsColor() const

Determines if property is a color.

bool  IsFont() const

Determines if property is a font.

bool  IsEnumerated() const

Determines if property is an enumeration.

bool  IsBool() const

Determines if property is a boolean.

bool  IsOleColorAlias() const

Determines if property is an OLE color alias.

bool  IsPerPropertyBrowse() const

Determines if the control supports per property browsing.