User Objects in Delphi ActiveX Controls

2003-09-16 10:20:01 PM
I have developed a number of simple OCX's that wrap Delphi's VCL
controls(i.e. Button, ComboBox, etc) and I noticed that the first instance
and each additional instance of these controls (in any OLE container) will
increase the User Object count for the process. If I create the same OCX in
MFC the User Object count is only increased on the first instance and
remains the same no matter how many other instances exist. Is there a way
to get around this abnormal handle allocation in Delphi?