![]() |
CXTCaptionThemeOffice2007 |
Post Reply ![]() |
Author | |
adrien ![]() Senior Member ![]() Joined: 30 April 2007 Location: New Zealand Status: Offline Points: 449 |
![]() ![]() ![]() ![]() ![]() Posted: 24 February 2008 at 7:41pm |
Office2007 theme for CXTCaption in case anyone wants it.
To use, in your caption, use
pCaption->SetTheme(new CXTCaptionThemeOffice2007);
enjoy.
class CXTCaptionThemeOffice2007 : public CXTCaptionThemeOffice2003
{ public: virtual void DrawCaptionBack(CDC* pDC, CXTCaption* pCaption, CRect& rcItem); virtual void RefreshMetrics(); CXTPPaintManagerColorGradient m_clrNormalCaption; // Color of pane caption when inactive. void CXTCaptionThemeOffice2007::RefreshMetrics() if (XTPOffice2007Images()->IsValid()) m_clrNormalCaption.SetStandardValue(XTPOffice2007Images()->GetImageColor(_T("DockingPane"), _T("NormalCaptionLight")),
|
|
![]() |
|
adrien ![]() Senior Member ![]() Joined: 30 April 2007 Location: New Zealand Status: Offline Points: 449 |
![]() ![]() ![]() ![]() ![]() |
actually the DrawCaptionBack func was ripped out of the docking pane tab drawing code, so will actually look better if you just have
void CXTCaptionThemeOffice2007::DrawCaptionBack(CDC* pDC, CXTCaption* pCaption, CRect& rcItem)
{ XTPDrawHelpers()->GradientFill(pDC, rcItem, m_clrNormalCaption, FALSE); pDC->FillSolidRect(rcItem.left, rcItem.bottom - 1, rcItem.Width(), 1, m_arrColor[XPCOLOR_FRAME]);
} |
|
![]() |
|
Oleg ![]() Senior Member ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Thanks for sharing.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() |
Why not provide a screenshot?
Thanks!
|
|
![]() |
|
markr ![]() Senior Member ![]() Joined: 01 August 2004 Status: Offline Points: 443 |
![]() ![]() ![]() ![]() ![]() |
Hi Adrien,
Thanks for sharing this code; I've been looking to do something similar, and you've saved me the trouble of figuring it out. - Mark R. |
|
![]() |
|
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() |
Possible improvement.
void CXTCaptionThemeOffice2007::DrawCaptionText(CDC* pDC, CXTCaption* pCaption)
{ int oldBkMode = pDC->SetBkMode(TRANSPARENT); CXTCaptionThemeOffice2003::DrawCaptionText(pDC, pCaption); pDC->SetBkMode(oldBkMode); } |
|
![]() |
|
Kenneth ![]() Senior Member ![]() ![]() Joined: 23 May 2004 Location: United States Status: Offline Points: 256 |
![]() ![]() ![]() ![]() ![]() |
Many thanks. That resolved a problem I was having.
Ken
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |