Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated


Marks the beginning of the object's property map.

BEGIN_PROP_MAP( theClass )



[in] Specifies the class containing the property map.

The property map stores property descriptions, property DISPIDs, property page CLSIDs, and IDispatch IIDs. Classes IPerPropertyBrowsingImpl, IPersistPropertyBagImpl, IPersistStreamInitImpl, and ISpecifyPropertyPagesImpl use the property map to retrieve and set this information.

When you create an object with the ATL Project Wizard, the wizard will create an empty property map by specifying BEGIN_PROP_MAP followed by END_PROP_MAP.

BEGIN_PROP_MAP does not save out the extent (that is, the dimensions) of a property map, because an object using a property map may not have a user interface, so it would have no extent. If the object is an ActiveX control with a user interface, it has an extent. In this case, you must specify PROP_DATA_ENTRY in your property map to supply the extent.

   PROP_DATA_ENTRY( "Width", m_nWidth, VT_UI4 )
   PROP_DATA_ENTRY( "Height", m_nHeight, VT_UI4 )
   PROP_ENTRY( "Property1", 1, CLSID_MyClassPropPage1 )
   PROP_ENTRY_EX( "Caption", DISPID_CAPTION, CLSID_MyClassPropPage2, IID_IMyDual1 )
   PROP_PAGE( CLSID_CMyClassPropPage3 )
© 2016 Microsoft