Adding ActiveX control

Posted on 2000-04-23
Last Modified: 2010-04-02
Hi im new to c++ and im sure this question has been asked many times. I want to use Microsofts TabStrip control and when I add it to my dialog and run the program nothing shows up. The dialog wont even show up. I tried to register the control again and it seems to be registered I dont understand the problem. Am I supposed to instanciate the control myself in the dialog boxes OnInit method I thought VC++ does this. Help!!
Question by:GoofyJoe99
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
  • 3
  • 3
  • 2

Expert Comment

ID: 2742407
  It's most likely a step you didn't do.  The way to add the TabStrip is
   1.  Go to your Project Menu, click Add to Project, then Registered ActiveX Controls.
   2.  Search for the Microsoft Tabstrip you want, double click on it.
   3.  Click OK to the dialog asking you do you want to insert it into your project
   4.  Click OK to the dialog informing you of the files that will be added to your project
   5.  Now you should notice the Tabstrip on your Toolbox.  Click on the Tabstrip, and then click on your dialog and that places the Tabstrip on your dialog.  IF you don't see it on the dialog as soon as you click on the dialog then you did something wrong.
   6.  Compile the project and it works.


Author Comment

ID: 2746216
Yeah i thinnk i did all that. I compile the program with the tabstrip on the dialog and it compiles fine. Then I click to run the exe and it just ends immedeately and the doalog doesnt even show up I dont get it

Expert Comment

ID: 2747131
Is your application dialog based and if yes, did you set the ActiveX on the main dialog of your project ?

If not you've got to instanciate your new dialog !!

Give me more details about the way you implemented your project !
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Expert Comment

ID: 2747174
Well, I've just done the same test you did in a new project, and this works perfectly ! (using Microsoft TabStrip v6.0 in VC++6)

Your problem can come from many things :

1) In AppWizzard,did you check the ActiveX control check box in the second step ? This point gives your apllictaion a support for ActX !

2)Do you use default properties in the ActiveX, or have you personnalised them ? If personnalised , try to use default properties and see what happens !

Btw, if other, you can give me your e-mail adress,and I'll post you the code of the little project I made to test TabStrip ActX ...

Expert Comment

ID: 2747489
The ActiveX control check box is checked by default so he doesn't need to do that.

Expert Comment

ID: 2747879
Hi Glenn,
I agree, I should have said " I hope you have not unchecked the 'ActiveX controls' option in the second step" !
Well, sorry for that.

Btw, I don't understand Goofy's problem! As I explained, I've did all the steps he tells us he had done (your first answer that was rejected, indeed) and everything works fine !
That's why I think the problem comes from somewhere else in his code !

The point I find intrresting in his latest comment is :
>>the doalog doesnt even show up

That's why I'd like him to give us more details about the project in which h wants to insert the ActiveX...

Accepted Solution

GlennDean earned 50 total points
ID: 2748702
Hi degarn:
   I agree.  Typically when one has problems like that it's something simple like forgetting to Initialize COM (in this case though AppWizard generates that call to AfxEnableControlContainer() so it's good to go - yank out that line and of course everything goes wacko).  
   GoofyJoe99: I would also try using the debugger and set a breakpoint in your app's InitInstance() function.  Step thru the code line by line and see which line causes the gag.  See if its AfxEnableControlContainer or the line
 int response = dlg.DoModal();


Author Comment

ID: 2750492
Thanks to both of you I forgot to instanciate it and  didnt know how but now i do and it works thanks :)

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

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