Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Adding ActiveX control

Posted on 2000-04-23
Medium Priority
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 !
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.


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 150 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

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!

Question has a verified solution.

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

This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

719 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