Solved

COM and ActiveX

Posted on 2002-05-29
4
296 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

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…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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 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…

630 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