Print Page | Close Window

CXTPTabCtrl background colour

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=21754
Printed Date: 16 May 2024 at 9:43am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPTabCtrl background colour
Posted By: JamesP
Subject: CXTPTabCtrl background colour
Date Posted: 28 June 2013 at 7:30am
I've added a CXTPTabCtrl to a dialog in one of our applications that contains the Office 2007 / Office 2010 / theme. 

I'm currently setting the dialog color by setting up a brush based on the color returned from XTPResourceImages()->GetImageColor(_T("DockingPane"), _T("WordPaneBackground")); and overriding the OnCtlColor function, as per your Ribbon Sample.

The CXTPTabCtrl control that I add leaves a nasty grey strip behind the tabs rather than reflecting the theme. When I debug into the code there is a function CXTPTabBaseTheme::GetBackColor() that returns the value GetXtremeColor(COLOR_3DFACE), whereas the value I want is contained in the color enumeration, XPCOLOR_3DFACE (amongst others).

Is this a bug? The only way I've found to get around this is to make a call
XTPColorManager()->SetColor(COLOR_BTNFACE, GetDialogColour()); after setting the theme,
but this has other undesired side effects, such as leaving disabled edit boxes with a strange multicolored look.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net