Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 984
  • Last Modified:

Adding a dialog into a CTabCtrl

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
israel022697
Asked:
israel022697
1 Solution
 
Tommy HuiCommented:
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
 
israel022697Author Commented:
"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
 
SangeethaCommented:
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

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now