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

x
?
Solved

Background color with tab control and XP themes

Posted on 2008-06-20
3
Medium Priority
?
1,996 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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

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…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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 additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

772 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