Board index » cppbuilder » A Class that Implements User Interfaca + COM Interface

A Class that Implements User Interfaca + COM Interface

Hi there. Digging into Delphi I have discovered the following declaration:

  TOleControl = class(TWinControl, IUnknown, IOleClientSite,
    IOleControlSite, IOleInPlaceSite, IOleInPlaceFrame, IDispatch,
    IPropertyNotifySink, ISimpleFrameSite)

and the Delphi-compiler produces the following header:

class PASCALIMPLEMENTATION TOleControl : public Controls::TWinControl
{
    // declare all the interfaces methods as from the Delphi code

Quote
};

Now is it possible from C++ and from scratch to create a visual control that
implements COM Interfaces ? I mean can I add COM objects to components ?

Hopefully I can, otherwise would be upset not being able to do the same
feature.
Thanks,

 

Re:A Class that Implements User Interfaca + COM Interface


Yes you can. A good example would be the ActiveForm.
.a

Quote
HelcioMayor wrote:

[snip]

Other Threads