Change tab color and background of Property sheet.
Hi, everyone.
I have a difficult about Propertysheet.
I'm trying to change color of Properysheet.
First of all, I made a derived TabCtrl class to change Tab color.
This is my source.
If I use the function FillSolidRect(...), Propertysheet is filled with my
assigned color.
Unfortunatly, I can't see second and thrid tab.
After I click those position, I can see that.
If I don't use that function, can see all tabs.
Are there any good man to give me a perfect solution for this one?
Thanks.
void CTabCtrlEx::DrawItem(LPDRAWITEMSTRUCT lpDIS)
{
CRect the_r = lpDIS->rcItem;
CBrush the_br(RGB(0,0,0));
CDC* the_dc = CDC::FromHandle(lpDIS->hDC);
the_dc->SelectObject(the_br);
the_dc->SetTextColor(MFV_COLOR_CTRL_TEXT);
CRect rect;
GetClientRect(&rect);
the_dc->SetBkColor(MFV_COLOR_BACK);
the_dc->FillSolidRect(rect, MFV_COLOR_BACK);// <- This is a big
problem.
the_r.top= the_r.top +3;
if(lpDIS->itemID ==0)
{
the_dc->SetBkColor(MFV_COLOR_BACK);
the_dc->DrawText("General",the_r,1);
}
if(lpDIS->itemID ==1)
{
the_r.left=the_r.left-2;
the_dc->SetBkColor(MFV_COLOR_BACK);
the_dc->DrawText("Quality Control",the_r,1);
}
if(lpDIS->itemID ==2)
{
the_r.left=the_r.left-2;
the_dc->SetBkColor(MFV_COLOR_BACK);
the_dc->DrawText("Advanced",the_r,1);
}
the_dc->DeleteTempMap();
Quote:
}