Search code examples
c++comactivex

How to use an ActiveX control in a com's interface or in a non-mfc application?


In vs mfc project,an ActiveX control can be added in "tools"->Add Class from ActiveX Control Wizard.That will create a class which inherited from CWnd and I can create an instance of ActiveX by calling CreateControl.But I just want to call the inner interface function in ActiveX,not its UI.So how to use it in a non-MFC app or someother's project without UI,such as dll or com,etc.


Solution

  • ActiveX is just COM so you may create instance from clsid and call methods of it.