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

x
?
Solved

CTabCtrl inside a dialog?

Posted on 1998-03-29
2
Medium Priority
?
985 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 100 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

879 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