ActiveX - OCX control
What is OCX:
1) OCX stands for OLE Control eXtensions
2) Binary files of Windows ActiveX objects
3) They are COM components
4) Built on top of COM technology
5) OCX is a dll used to store ActiveX controls
6) Can be used in many different programs (reusablility)
1) OCX stands for OLE Control eXtensions
2) Binary files of Windows ActiveX objects
3) They are COM components
4) Built on top of COM technology
5) OCX is a dll used to store ActiveX controls
6) Can be used in many different programs (reusablility)
Basic elements of OCX:
1) What is an ODL file?
ODL stands for object definition language
parsed by Mktyplib.exe
now obsolete
2) Contains a Library which contains coclasses
3) CoClass groups dispinterfaces
4) dispinterfaces contains properties, methods and events
5) Places an interface in the .idl file as a dispatch interface.
6) Specifies a dispid parameter for a member function (either a property or a method)
OCX classes:
COleControlModule
Derived from CWinApp
The base class from which an OLE control module object is derived
COleControl
Derived from CWnd
base class for developing OLE controls
COlePropertyPage
Used to display the properties of a custom control
ActiveX Server – Container Creation:
Creating an OCX:
1) How to create OCX Project
2) How to add Controls
3) How to add Methods
4) How to add Properties
5) How to add Events
Using OCX in a MFC Application:
1) Insert the ActiveX control
2) Create wrapper class using class wizard
3) Create an object for the ActiveX control
4) Use methods, properties and events
1) Insert the ActiveX control
2) Create wrapper class using class wizard
3) Create an object for the ActiveX control
4) Use methods, properties and events
Refer: REMOTE PROCEDURE CALL