Solved

Adding a dialog into  a CTabCtrl

Posted on 1998-06-08
3
900 Views
Last Modified: 2013-11-19
I have a dialog, within it I have a CTabCtrl, I have another two smaller dialogs which are the same size of the CTabCtrl. I would like to add these to dialogs into the CTabCtrl.
I looked in the help and documents I have and all I could find is how to insert a tab using the CTabCtrl::InsertItem function that takes a TC_ITEM structure as parameter but in this structure all I can set is the tab text, image .. but I cannot reference a dialog to the tab.
How can I do that ?
I don't want to use PropertySheet from other reasons.
0
Comment
Question by:israel022697
3 Comments
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 50 total points
ID: 1316183
The items in the tab are displayed at the top of the tab. You add these to the tab control and as you get notifications from the tab control, you can display whatever dialog you want. That's why there's no reference to dialogs in the tab. The tab is generic enough to support anything else you want. So you will have to do the work of trapping events from the tab control (meaning that someone clicked or selected a tab) and how you want your application to respond to it (by showing a particular dialog).
0
 

Author Comment

by:israel022697
ID: 1316184
"The items in the tab are displayed at the top of the tab. You add these to the tab control" --> What items and how do I add them to the tab control ?
You're saying that I have to catch all the tab control events and show and hide my dialogs manually ? ( and position them according to the tab control position ?? )
0
 

Expert Comment

by:Sangeetha
ID: 1316185
If u want to add the dialogs by default, then u have to work with PropertyPage for that. If u want the CTabCtrl, then u have to trap the controls and display the dialog according to ur need. No other way for that.........
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…

911 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

22 Experts available now in Live!

Get 1:1 Help Now