Solved

Adding ActiveX control

Posted on 2000-04-23
8
256 Views
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!!
0
Comment
Question by:GoofyJoe99
[X]
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
8 Comments
 
LVL 3

Expert Comment

by:GlennDean
ID: 2742407
Hi:
  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.

   Glenn
0
 

Author Comment

by:GoofyJoe99
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
0
 

Expert Comment

by:degarn
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 !
0
Technology Partners: 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

by:degarn
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 ...
0
 
LVL 3

Expert Comment

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

Expert Comment

by:degarn
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...
0
 
LVL 3

Accepted Solution

by:
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();

   Glenn
0
 

Author Comment

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

Featured Post

Industry Leaders: 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

Suggested Solutions

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
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.

761 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