ActiveX

Hi,
 Can any one tell me how to develop  an ActiveX control using VC++???

Thanx in advance
ArunaKAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
jlsjlsConnect With a Mentor Commented:
This depends on the client application (language).
You' ll need to register the control first.

Example in Visual C++ using MFC :
File - New - MFC AppWizard - Fill in name of component - Next - Dialog Based- Next - support Automation/ActiveX Controls - Finish

Add Control to application :
In DialogEditor : Project - Add to project - Components and controls - Registered ActiveX Controls - Browse to component and Insert (some classes need to be made).
Drag component on dialogbox and add membervariable for it in Classwizard. One can address methods and properties of the control.

One can follow simular operation in VB.
0
 
jlsjlsCommented:
Using Microsoft Visual C++ :
File - New - MFC ActiveX ControlWizard - Fill in name of component - Next - Finish

Now you've created a framework for an ActiveX control.
In order to set properties :
View - Classwizard - Automation - Add property : fill in name and type of property (Get/Set property)

In order to create methods :
View - Classwizard - Automation - Add method : fill in name and returntype

Now you'll need to add the implementation of the method/property. You can use the ClassView to go to the method/property.

Hope this helps.
jlsjls
0
 
ArunaKAuthor Commented:
hi,
thanx for ur response ya after creating the .ocx component as u told how can i use it in a client application???

Thanx in advance
0
All Courses

From novice to tech pro — start learning today.