![]()  | 
 
CXTCaptionThemeOffice2007 | 
 
    Post Reply  
   | 
  
| Author | |
   
   adrien  
   
   Senior Member  
   Joined: 30 April 2007 Location: New Zealand Status: Offline Points: 449  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: CXTCaptionThemeOffice2007Posted: 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  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 24 February 2008 at 7:44pm | 
 
| 
   
    
   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  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 25 February 2008 at 2:06pm | 
 
| 
   
    
   Thanks for sharing.
    
   
   | 
 |
| 
   
     
     Oleg, Support Team 
   
  CODEJOCK SOFTWARE SOLUTIONS  | 
 |
![]()  | 
 |
   
   znakeeye  
   
   Senior Member  
   Joined: 26 July 2006 Status: Offline Points: 1672  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 26 February 2008 at 4:10pm | 
 
| 
   
    
   Why not provide a screenshot?
 
   
  Thanks! 
    | 
 |
![]()  | 
 |
   
   markr  
   
   Senior Member  
   Joined: 01 August 2004 Status: Offline Points: 443  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 27 February 2008 at 3:05pm | 
 
| 
   
    
   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  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 01 March 2008 at 6:29am | 
 
| 
   
    
   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  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Posted: 01 March 2008 at 11:38am | 
 
| 
   
    
   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  |