Solved

CTabCtrl inside a dialog?

Posted on 1998-03-29
2
977 Views
Last Modified: 2008-02-01
Need source to implement CTabCtrl in a dialog.  I created all of my pages as dialogs and would rather use CTabCtrl instead of property pages in my main dialog box.  I don't want the APPLY button or any of the buttons that come along with CPropertyPage but would like to setup each page in the same manner.  Am I forced to use CPropertyPage?  I placed the CTabCtrl control in my main dialog and in OnInitDialog was successful in adding the tabs but now need to place the actual dialogs on each of the pages.  Help...point me to some good code...
0
Comment
Question by:xlr8tn
2 Comments
 
LVL 3

Accepted Solution

by:
LucHoltkamp earned 50 total points
ID: 1183924
The CTabContral is just a simple control, you have to put ALL your controls in ONE dialog and hide an disable them yourself according to the position of the tab. This will also result in flickering on the screen as the controls are switched on and off.
For this reason it's not a good idea to use CTabControl in dialogs. Better use a propertypage.

.luc.
0
 

Author Comment

by:xlr8tn
ID: 1183925
I found an example that allowed me to create my tabs using CPropertyPage referencing my dialogs.  There was a trick involved with using a picture box and then in OnInitDialog changing some of the attributes.  I actually got it to work with very little effort.  I guess what I was really looking for was how to get rid of the buttons that come on a propertysheet (i.e. Apply, Cancel, and OK).  
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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

778 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