Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - CXTPTabCtrl background colour
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPTabCtrl background colour

 Post Reply Post Reply
Author
Message
JamesP View Drop Down
Groupie
Groupie
Avatar

Joined: 07 January 2009
Location: United Kingdom
Status: Offline
Points: 73
Post Options Post Options   Thanks (0) Thanks(0)   Quote JamesP Quote  Post ReplyReply Direct Link To This Post Topic: CXTPTabCtrl background colour
    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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.219 seconds.