Check out the custom item samples in:

C:\MediaLab\Samples\Sample5 custom items

As well as the section in the user's guide on custom items--that might be a good start as these particular samples directly address this question.