Associating Icons with a Category

Building a user interface that allows the user to select component categories within a category requires the ability to display a meaningful image for a particular category. To associate an icon with a component category, create a key for the category's CATID and populate that key with a DefaultIcon sub-key. The Registry entry is as follows:

HKEY_CLASSES_ROOT\CLSID\{...catid...}\DefaultIcon = "c:\hello\icons.dll,1"
 

The filename referenced by the DefaultIcon key can be either a .EXE or .DLL file (resource-only .DLL).

To associate small 16x16 "toolbox bitmap" with a component category, create a key in HKEY_CLASSES_ROOT\CLSID for the category's CATID and populate that key with a TolboxBitmap32 sub-key. For example:

HKEY_CLASSES_ROOT\CLSID\{...catid...}\ToolboxBitmap32 = "c:\goodbye\mycomponent.dll,42"
 

The filename referenced by the ToolboxBitmap32 key can also be a .EXE or .DLL file (resource-only .DLL).

See Also

EnumCategories, EnumClassesOfCategories, EnumImplCategoriesOfClass, EnumReqCategoriesOfClass, GetCategoryDesc, ICatInformation, IsClassOfCategories, RegisterCategories, RegisterClassImplCategories, RegisterClassReqCategories, UnRegisterCategories, UnRegisterClassImplCategories, UnRegisterClassReqCategories