Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

BEGIN_CATEGORY_MAP

Marks the beginning of the category map.

BEGIN_CATEGORY_MAP( theClass )

Parameters

theClass
[in] The name of the class containing the category map.

Remarks

The category map is used to specify which component categories the COM class will implement and which categories it requires from its container.

Add an IMPLEMENTED_CATEGORY entry to the map for each category implemented by the COM class. Add a REQUIRED_CATEGORY entry to the map for each category that the class requires its clients to implement. Mark the end of the map with the END_CATEGORY_MAP macro.

The component categories listed in the map will be registered automatically when the module is registered if the class has an associated OBJECT_ENTRY_AUTO or OBJECT_ENTRY_NON_CREATEABLE_EX_AUTO.

Note   ATL uses the standard component categories manager to register component categories. If the manager is not present on the system when the module is registered, registration succeeds, but the component categories will not be registered for that class.

For more information about component categories, see What are Component Categories and how do they work? in the Platform SDK.

Example

BEGIN_CATEGORY_MAP(CMyControl)
    IMPLEMENTED_CATEGORY(CATID_Insertable)
END_CATEGORY_MAP()

See Also

Category Macros | ATL Macros | IMPLEMENTED_CATEGORY | REQUIRED_CATEGORY | END_CATEGORY_MAP

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.