Registration Macros

DECLARE_DESIGNER_REGISTRY_MAP(REGENTRY * pArray)

The registration data accessed by CComDesignerBase must be declared before the definition of the derived class in order for the derived class to compile. This macro wraps around the supplied static REGENTRY array and provides the forward declaration.

REGISTER_DESIGNER_FEATURES

To use the registration features provided by CComDesignerBase, the derived class must override the UpdateRegistry method. The REGISTER_DESIGNER_FEATURES() macro provides an implementation of UpdateRegistry that calls the CComDesignerBase::UpdateDesignerFeatures method. UpdateDesignerFeatures gathers registration information from the REGENTRY map.

This macro is defined as follows:

REGISTER_DESIGNER_FEATURES (int iResID)

iResID

Resource ID of the generated .RGS file.

Registration Map Macros

The following macros wrap around a static REGENTRY array that is accessed by the ATL registration mechanism at registration time. The macros are listed in alphabetical order.

BEGIN_DESIGNER_REGISTRATION_MAP (class T, REGENTRY *pArray)

Starts the registration map pArray for class T. Required.

DECLARE_DESIGNER_REGISTRATION_MAP (REGENTRY *pArray)

Forward-declares the REGENTRY array pArray. Place this macro before the class definition so that the class can access the array. Required.

END_DESIGNER_REGISTRATION_MAP ()

Ends the registration map. Required.

INSTANCECLSID_ENTRY (CLSID clsid)

Sets the value of the InstanceClsid registry key to clsid.

MISCSTATUS_ENTRY (DWORD dwMiscStatus)

Adds the OLE miscellaneous status flags in dwMiscStatus to the MiscStatus\1 registry key. This macro can be used more than once in the registration map.

OPTIONAL_DESIGNERFEATURES_ENTRY (DWORD dwFeatures)

Adds designer features in dwFeatures to the Optional data field of the DesignerFeatures registry key. This macro can be used more than once in the registration map.

REQUIRED_DESIGNERFEATURES_ENTRY (DWORD dwFeatures)

Adds designer features in dwFeatures to the Required data field of the DesignerFeatures registry key. This macro can be used more than once in the registration map.

TOOLBOXITEMCT_ENTRY (int iItemCt)

Sets the toolbox item count in the ItemCt value of the DesignerToolbox registry key.

TOOLBOXNAMEID_ENTRY (int iNameID)

Sets the toolbox name resource ID in the NameID value of the DesignerToolbox registry key.

TOOLBOXSTARTID_ENTRY (int iStartID)

Sets the toolbox starting resource ID in the StartID value of the DesignerToolbox registry key.

TYPELIBID_ENTRY (IID Typelibid)

Sets the value of the TypeLibID registry key to Typelibid.

See Also

DesignerToolbox, DesignerFeatures