This is common problem with CStatusBar the trick is to SetBkMode(TRANSPARENT) a custom draw class example
void CStatusBarTreeEx::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
{
AFX_STATUSPANE* pPane = GetTreePane(lpDrawItemStruct->itemID);
if(pPane)
{
// now draw the text if required
if(!pPane->strText.IsEmpty())
{
CDC dc;
CRect rect;
int oldBkMode;
COLORREF oldTextColor;
UINT nFormat = DT_LEFT|DT_SINGLELINE|DT_EXPANDTABS|DT_NOPREFIX|DT_VCENTER;
rect = lpDrawItemStruct->rcItem;
dc.Attach(lpDrawItemStruct->hDC);
oldTextColor = dc.SetTextColor(theApp.m_clrThemeBtnText);
oldBkMode = dc.SetBkMode(TRANSPARENT);
dc.DrawText(pPane->strText, pPane->strText.GetLength(), rect, nFormat);
dc.SetTextColor(oldTextColor);
dc.SetBkMode(oldBkMode);
dc.Detach();
}
}
}