Solved

Adding ActiveX control

Posted on 2000-04-23
8
218 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
  • 3
  • 3
  • 2
8 Comments
 
LVL 3

Expert Comment

by:GlennDean
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Expert Comment

by:degarn
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 3

Expert Comment

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

Expert Comment

by:degarn
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
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 concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now