DesignerToolbox Key

The DesignerToolbox key specifies items to appear in the host's toolbox.

Registry Entry

HKEY_CLASSES_ROOT\CLSID\DesignerClsid\DesignerToolbox
   NameId
NameId
   ResourcePath
ResourcePath
   ItemStartId
ItemStartId   
   ItemCount
ItemCount
   HelpContextIds
HelpContextIds

Value Entries

NameId

A DWORD value specifying a resource ID. The resource ID identifies a string that names the set of toolbox items for the host to display in its toolbox palette.

ResourcePath

A string containing the path of the DLL that contains the toolbox bitmaps and NameId string resources.

ItemStartId

A DWORD value specifying the starting resource ID in the designer's DLL that defines a toolbox item.

ItemCount

A DWORD value specifying the number of consecutive resource IDs that define toolbox items.

HelpContextIds

An array of DWORD values specifying the help context IDs for the toolbox items. The length of the array must be equal to ItemCount. The help context IDs must be in the same help file specified for the designer's type library.

Comments

The DesignerToolbox key specifies items to appear in the host's toolbox. Only the HelpContextIds value is optional; all the other named values (NameId, ResourcePath, ItemStartId, and ItemCount) are required.

The ResourcePath value specifies the DLL that contains the set of bitmaps representing the toolbox items, and the string (NameId) that names this set.

The ItemStartId and ItemCount values define the starting resource ID and number of items in the DLL that the host can display in its palette. The items must appear consecutively in the file.

The HelpContextIds value is an array of help context IDs for the items in the toolbox. The array must have one entry for each item in the toolbox, and the entries must appear in the same order as the toolbox entries. The help file for the toolbox items must be the same as the help file specified for the designer's type library.

Each resource ID is associated with two resources: a string resource and a bitmap resource. The string resource contains the text used as the label for the toolbox item. The bitmap resource defines the image used in the toolbox. Each bitmap is 16x16 pixels; its lower left pixel defines the transparent color of the bitmap. The host is responsible for generating the Disabled and Selected versions of the bitmap.

The following example shows the resource definition for a designer that contributes three items to the host's toolbox:

//MyDesigner.rc
1001 BITMAP “one.bmp”
1002 BITMAP “two.bmp”
1003 BITMAP “three.bmp”
STRINGTABLE
BEGIN
    1000, “MyDesigner Tools”
    1001, “FirstItem”
    1002, “SecondItem”
    1003, “ThirdItem”
END

The entries under the \DesignerToolbox registry key for this designer are as follows:

\DesignerToolbox
   NameId
1000
   ResourcePath
MyDesigner.DLL
   ItemStartId
1001
   ItemCount
3

See Also

IDesignerToolbox