Solved

Background color with tab control and XP themes

Posted on 2008-06-20
3
1,959 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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
maxBlock challenge 30 101
notReplace  challenge 53 102
Exception thrown at 0x00007FFD5BC81F28 7 31
Not needed 13 58
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

743 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

12 Experts available now in Live!

Get 1:1 Help Now