Solved

ActiveX

Posted on 2004-08-16
3
298 Views
Last Modified: 2013-11-20
Hi,
 Can any one tell me how to develop  an ActiveX control using VC++???

Thanx in advance
0
Comment
Question by:ArunaK
  • 2
3 Comments
 
LVL 3

Expert Comment

by:jlsjls
ID: 11818875
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
 

Author Comment

by:ArunaK
ID: 11818895
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
 
LVL 3

Accepted Solution

by:
jlsjls earned 50 total points
ID: 11819301
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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now