Solved

Background color with tab control and XP themes

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Setting nameservers after res_init fails doing res_query 2 109
How to gracefully close the c++ 11 thread? 3 108
Unable to start eclipse ? 17 154
Thin secure Windows 10 5 102
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‚Ķ
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall‚Ķ
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 how to clear a vector as well as how to detect empty vectors in C++.

828 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