Solved

COM and ActiveX

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
My project did see openJDK that I installed. What could be the problem 7 172
What are the big features of MVC5? 4 104
Thin secure Windows 10 5 116
VS2015 Redefinition errors 4 105
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
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…

751 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