Solved

Background color with tab control and XP themes

Posted on 2008-06-20
3
1,964 Views
Last Modified: 2013-11-20
I have a dialog with a tab control on it.  Tab pages are created from dialog resources.  When the tab control displays, the tabs are "white" and the background of the tab pages is the COLOR_BTNFACE color.  When I call EnableThemeDialogTexture for the dialog page object, now the background of the dialog appears to be "white" while the tab page has a white gradient getting darker toward the bottom.  This leaves an outline around where my dialog resource is being displayed.  How do I get the gradient to come out right?  Do I need to call DrawThemeBackground on the page?
0
Comment
Question by:kevinbenedict
  • 2
3 Comments
 
LVL 49

Expert Comment

by:DanRollins
ID: 21838626
If you provide a screenshot, we might be better able to understand the problem.

When I hear that somebody is using a tab control in a dialog, I'v found that they are really trying to create and use a CPropertySheet and a set of CPropertyPage objects, but are unaware of how to use these things.   Are you are trying to create a dialog similar to the one shown here http://msdn.microsoft.com/en-us/library/bb774538(VS.85).aspx#Property_Sheet_Basics ?
0
 

Author Comment

by:kevinbenedict
ID: 21857250
See attached SampleTab.jpg file for an example.  Using a tab control instead of property sheet / property pages can be easier to use in the case where you want to customize how the property sheet works and when you want to combine it with other controls on the page.  You don't have to deal with the buttons at the bottom etc...
SampleTab.JPG
0
 

Accepted Solution

by:
kevinbenedict earned 0 total points
ID: 21875568
Sizing the dialog page to fill the tab control solves the problem.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

911 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

24 Experts available now in Live!

Get 1:1 Help Now