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!

Hello & Newbee question

Status
Not open for further replies.

flowbee

Programmer
Nov 17, 2001
1
US
Hi guys/gals --
First off, let me introduce myself -- My name is Art, and I've been a programmer for a few years but have just started learning about ActiveX.

I've written my very first ActiveX control using Visual C++ with very limited functionality, and have also written (with the help of the AppWizard) a container application that uses it.

My question is a fairly basic one. It's something that I've searched lots of documentation but have not really been able to find the answer to a sufficient degree of understanding.

What is the difference between the 1) Wrapper Class of an ActiveX control and the 1) Type Class of an ActiveX control that are generated by the Visual C++ ClassWizard when I try to use the ActiveX control on my container program? I can see that they're different when I look at the code, and yet they SO much alike. Do I need both of them, or will one or the other suffice? It seems that the wrapper class is a must because it is automatically generated when I try to use the ActiveX control I just inserted, but I actually have to go out of my way to have the ClassWizard to import the type library. My program seems to work fine without importing the type library from the ActiveX control. And the other thing is, when I use someone else's OCX, there is no .TLB, .OLB, or .DLL files from which to import a type library.

In advance, thanks so much for your help. I would very much appreciate any information that would shed light to this confusing (to me at least) topic.

- Art
 
I am also fairly new to ActiveX, so forgive me if this info is not what you are asking. It sounds like you have added the ActiveX control project into your container's workspace and that is why you see the .tlb etc files. When you add your .ocx into a container all you need is the wizard generated wrapper class which is why when using a distributed .ocx there is not a type library to import.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top