// TODO: Change any attributes of the DC here int nID = pWnd->GetDlgCtrlID(); if(nID==IDC_MYSTATIC)//你的static的名字,最后建好后将它改一下名,不用它的 //默认的ID:IDC_STATIC { pDC->SetTextColor(RGB(100,20,120)); //设置字体颜色 pDC->SetBkMode(TRANSPARENT); return HBRUSH(GetStockObject(HOLLOW_BRUSH)); } return hbr; }
{
HBRUSH hbr = CRecordView::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
int nID = pWnd->GetDlgCtrlID();
if(nID==IDC_MYSTATIC)//你的static的名字,最后建好后将它改一下名,不用它的
//默认的ID:IDC_STATIC
{
pDC->SetTextColor(RGB(100,20,120)); //设置字体颜色
pDC->SetBkMode(TRANSPARENT);
return HBRUSH(GetStockObject(HOLLOW_BRUSH));
}
return hbr;
}
王厦鼓多人都只知道pDC->SetBkMode(TRANSPARENT);
这句,但是 ,没用