IMPLEMENT_STOCKPROP

IMPLEMENT_STOCKPROP( type**,** fname**,** pname**,** dispid )

Parameters

type

[in] The data type of the property.

fname

[in] Name used to create the names of the put and get methods.

pname

[in] Name used to create the name of the data member that stores the property value.

dispid

[in] The DISPID of the property.

Remarks

Creates a data member in your control class for a property, creates a put and get method for the property, and adds code to notify and synchronize with the container if the property changes.

The put and get method names are created by appending fname to put_ and get_. For example, if fname is BorderWidth, the method names are put_BorderWidth and get_BorderWidth.

The data member name is created by appending pname to m_. For example, if pname is nBorderWidth, the data member is m_nBorderWidth.

For text stock properties, use the IMPLEMENT_BSTR_STOCKPROP macro because it will automatically allocate a new string and copy the passed text into it. For boolean stock properties, use the IMPLEMENT_BOOL_STOCKPROP macro.

ATL Macros and Global Functions

See Also

CStockPropImpl