Solved

Adding a dialog into  a CTabCtrl

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

757 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