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
);
}