Solved

Adding a dialog into  a CTabCtrl

Posted on 1998-06-08
3
910 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.

831 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