Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CTabCtrl background color

Status
Not open for further replies.

dima2

Programmer
Jan 20, 2002
85
0
0
LB
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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top