Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Tabbed interface Buttons in OBSIDIAN Collapse All
Subject Author Date
Chun Pong Lau Oct 18, 2006 - 8:36 PM

Dear support team,

In Office 2007 OBSIDIAN version, the close tab button (a cross), move tabs to left and right buttons (left and right arrows) are in black, which are of little contrast with the dark gray background. I would like to change them to white but I cannot find the corresponding bmps in the res2007 folder.

Can you help me about this? Thanks a lot.

Alan


Technical Support Oct 19, 2006 - 8:31 AM

Thank you for the comment. Actually tab buttons when an Office 2007 theme is applied are not drawn using bitmaps. You can fix this issue by overriding the CExtPaintManager::PaintTabButton() virtual method in the way described below (make this changes directly to Prof-UIS).

Add this declaration to the CExtPaintManagerOffice2007_R2_Obsidian class:

#if (!defined __EXT_MFC_NO_TAB_CTRL)
 virtual void PaintTabButton(
  CDC & dc,
  CRect & rcButton,
  LONG nHitTest,
  bool bTopLeft,
  bool bHorz,
  bool bEnabled,
  bool bHover,
  bool bPushed,
  bool bGroupedMode,
  CObject * pHelperSrc,
  LPARAM lParam = 0L,
  bool bFlat = false
  );
#endif // #if (!defined __EXT_MFC_NO_TAB_CTRL)
Here is the implementation:
void CExtPaintManagerOffice2007_R2_Obsidian::PaintTabButton(
 CDC & dc,
 CRect & rcButton,
 LONG nHitTest,
 bool bTopLeft,
 bool bHorz,
 bool bEnabled,
 bool bHover,
 bool bPushed,
 bool bGroupedMode,
 CObject * pHelperSrc,
 LPARAM lParam, // = 0L
 bool bFlat // = false
 )
{
 ASSERT_VALID( this );
 ASSERT( dc.GetSafeHdc() != NULL );
COLORREF clrGlyph = 
   bEnabled
    ? RGB(255,255,255)
    : RGB(140,142,140);
COLORREF clrTL =
  GetColor(
   bPushed
    ? COLOR_3DDKSHADOW
    : COLOR_3DHILIGHT
    ,
   pHelperSrc,
   lParam 
   );
COLORREF clrBR =
  GetColor(
   bPushed
    ? COLOR_3DHILIGHT
    : COLOR_3DDKSHADOW
    ,
   pHelperSrc,
   lParam 
   );
 
 CExtPaintManager::stat_PaintTabButtonImpl(
  dc,
  rcButton,
  nHitTest,
  bTopLeft,
  bHorz,
  bEnabled,
  bHover,
  bPushed,
  bGroupedMode,
  clrGlyph,
  clrTL,
  clrBR,
  bFlat
  );
}