一. Static text控件透明色设置
HBRUSH CCAnalysisReport::OnCtlColor(CDC*pDC, CWnd*pWnd, UINTnCtlColor)
{
HBRUSH hbr = CFormView::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change anyattributes of the DC here
pDC->SetTextColor(RGB(51,51,51));
if (nCtlColor == CTLCOLOR_STATIC)
{
pDC->SetBkMode(TRANSPARENT);
return (HBRUSH)::GetStockObject(NULL_BRUSH);
}
// TODO: Return adifferent brush if the default is not desired
return hbr;
}