Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to start writing ActiveX?

Status
Not open for further replies.

ccSP

Programmer
Dec 12, 2005
2
GB
Hi All,

I am a newbie in ActiveX. I have been trying to read some articles and books in order to understand how to work on ActiveX.

I need to create an ActiveX controls to launch a application wrote by myself. And also, I hope I could use ActiveX to read files over internet. I know there are ways to do so via ActiveX. I had been trying very hard teaching myself in writing an ActiveX programme, but i found it hard and seems like going no where after weeks. There are not much book available which explain how i could write an ActiveX, nor tutorials from internet.

Could anyone help me? Pls advise me where I could start of and is there any good recommended tutorials or books available which is good enough for me to learn and start of. I really stuck now for a few weeks.

Thanks in advance,
SP.
 
In what language do you want to write your ActiveX "program"?

And ActiveX is often a misunderstood/misused word; exactly what kind of program are you looking for? A COM dll, an COM EXE or an ActiveX control?

Greetings,
Rick
 
I am writing in Visual C++.

To be honest, I don't really familiar with ActiveX as well. What is the different in writing a COM DlLL, COM EXE or ActiveX Control?

Let's say I wrote a plug-in in C++ as well. What I wish to do is that: the user can use my plug-in for the web page they are accessing. If you need more explanation, I could describe in detail my whole project.

Btw, there is another question: I am reading a MFC book and on the exploring ActiveX Controls chapter, I downloaded the sample code. But when i tried to execute the code, there is a error popping up: "cannot execute program". I realize that there is no exe file in my debug folder as well. But there is no error or warning when I build the code. How could it be? Any idea?

Thanks for your help,

SP
 
All of them are COM, two of them ar in-process (dll and control) and one of them is out of process (exe) and one of them is selectable from toolbars to place them on a dialog (activex control). But down to the basis they're all the same; all of them are servers that serve objects to their clients.

I'm not familiar with writing plug-ins for a web-page. But you can write activex controls for internet explorer (mozilla don't support activex controls).

Since you're writing in C++, I suggest you buy a book called Developer's workshop to COM and ATL 3.0, written by Andrew W. Troelsen and ISBN 1-55622-704-3. As the name suggests, it deals with writing with the active template library instead of MFC, but this is recommended anyway, considering the overhead that comes along with MFC. This book describes COM from the ground up, fist in plain C++, later on in ATL, so you'll get a full understainding of what COM is and does....

As for the other question:

ActiveX controls cannot be started on their own; you can test these in the Active test container (i believe its name is). This you can find on the tools menu, I think....

Greetings,
Rick
 
<ActiveX is often a misunderstood/misused word..

This suggests that there actually IS a correct definition for it.... :) Seriously, an ActiveX thingie is any thingie that Microsoft marketing people wanted to sound like it was cutting edge in 1998 or so, whether it actually was or not.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top