Solved

COM and ActiveX

Posted on 2002-05-29
4
281 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

760 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

22 Experts available now in Live!

Get 1:1 Help Now