Class not found error at run-time

I derived my component from TGroupBox and I put a couple of TMaskEdit
components in it adding some extra functionality.

Then I tried to use it in my application but it throws an exception "Class
TMaskEdit not found" during creation of the form with my component .

I tried to use RegisterClass() but I the excetions still appears.

                 RegisterClass(__classid(TMaskEdit));
                 TComponentClass classes[1] = {__classid(TPubBox)};
                 RegisterComponents("MyComps", classes, 0);

TIA
Marcin