Solved

Background color with tab control and XP themes

Posted on 2008-06-20
3
1,969 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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.
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.

803 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