Solved

COM and ActiveX

Posted on 2002-05-29
4
285 Views
Last Modified: 2013-11-25
I am just beginning to get familiar with COM objects. Is there a way that you can write an activeX component from scratch? I know how to create a activeX component from VC++ wizard. Do you use the same compiler? What format is the ocx file?
0
Comment
Question by:skibud2
4 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 200 total points
ID: 7042963
Sure you can create an ActiveX component w/o using the Wizard in VC++ but doing so is a lot of work for not much gain, in my opinion.  There is nothing magic about the VC++ wizard, it just builds a set of files based on a bit if input from you.  But nothing (except perhaps lack of knowledge) stops you from creating these same files by hand.

An OCX file is essentially a DLL.  You do not create these yourself but rather they are output by the LINKER.
0
 
LVL 22

Expert Comment

by:ambience
ID: 7043615
An activeX component is just a COM component that implements a few mandatory interfaces. Its all about implementing interfaces , if you implement them all using standard c++ without help from MFC or ATL .. you again get an activex component.

All the wizards do is plug-in boiler-plate code that implements most of the interfaces and functionality required, infact without even writing a extra single line you have a control.

There are samples on codeproject that demonstrate how to build simple COM components wihout help from MFC or ATL, those samples depict the boiler-plate code that you donot get to see normaly, maybe you should look into them, that will give you an idea of how much work is reequired to implement a full activeX control from scratch.
0
 
LVL 1

Expert Comment

by:ksenthilraj
ID: 7043660
Listening.......
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7043724
Create the simplest possible ActiveX control using the wizard and study the code.  

Now use the wizard to add a new member or property and study the resulting code.  It's all right there.

-- Dan
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
only14 challenge 19 75
NotAlone Challenge 20 83
Need to impress with my knowledge of .NET 5 89
SSRS troubles 4 47
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
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.

786 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