Hi,
I'm trying to set the background color of a tab control,
I derived a class from CTabCtrl and changed the background color by
overriding the OnEraseBackground
BOOL CMyTabCtrl::OnEraseBkgnd(CDC* pDC)
{
CTabCtrl::OnEraseBkgnd(pDC);
COLORREF color = RGB(0,108,175);
CRect Rect;
GetClientRect(&Rect);
pDC->FillSolidRect(Rect,color);
return TRUE;
}
I also colored the tabs individually by overriding the OnDrawItem
however my problem is that no matter what I do the borders of the tabs
remain grey (I guess it's part of the 3D effect of the tab)
how can I overcome this effect?
I'm trying to set the background color of a tab control,
I derived a class from CTabCtrl and changed the background color by
overriding the OnEraseBackground
BOOL CMyTabCtrl::OnEraseBkgnd(CDC* pDC)
{
CTabCtrl::OnEraseBkgnd(pDC);
COLORREF color = RGB(0,108,175);
CRect Rect;
GetClientRect(&Rect);
pDC->FillSolidRect(Rect,color);
return TRUE;
}
I also colored the tabs individually by overriding the OnDrawItem
however my problem is that no matter what I do the borders of the tabs
remain grey (I guess it's part of the 3D effect of the tab)
how can I overcome this effect?