Solved

COM and ActiveX

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
website content maintenance 3 100
firstChar challenge 13 121
Grunt No Clean Targets 6 188
Increment column based of a FK 8 31
I made this because I wanted to get e-mail with a attached csv file so I'd would be able to import user input into a MS Excel template, but I also wanted to register/save all inputs from each day in a file on the server. 1st - It creates a temp C…
In this article you will learn how to create a free basic website on Bitbucket, a git service provider. Polymer creates dynamic HTML components, which allow more flexibility than static HTML. This tutorial uses Ubuntu Linux but can also be done on W…
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.

861 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