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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Including ActiveX in a Visual C++ project

Status
Not open for further replies.

rhayek

Programmer
Jul 6, 2004
3
CA
I am trying to use an ActiveX class in a Visual C++ 6.0 project.

When I open the Project menu, and select "Components and Controls" under the "Add to Project" item, I can't find the class I am looking for in the "Registered ActiveX Controls" subfolder of the Gallery folder.

However, the Registry Editor shows that the control indeed has an entry there, complete with ProgID and LocalServer32.

Are there any ActiveX classes that are not meant to be compatible with Visual C++ (e.g., only for Visual Basic applications, perhaps)?

Thanks in Advance.


__________________
rh

 
Does the control show up in the Controls category in oleview? It's possible the class is registered but is not in the Controls category.
 
It does. Under the Type Libraries and under the Interfaces categories.

After asking a colleague, it turns out this is what I had to do:
I had to Add a Class from the Class Wizard, and choose the From a Type Library option, and then select the executable file which provides the server. This added the interface class definition into my workspace.
 
Yes, that'll work too. It's still strange it did not show up under the list of controls. Normally that happens only if the control did not properly register itself as a member of the controls category.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top