STatic 透明问题 内容重叠
重载了OnCtlColor
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); // TODO: Change any attributes of the DC here int nID = pWnd-> GetDlgCtrlID(); if(nID==IDC_Name)//你的static的名字,最后建好后将它改一下名,不用它的 //默认的ID:IDC_STATIC { pDC-> SetTextColor(RGB(100,20,120)); //设置字体颜色 pDC-> SetBkMode(TRANSPARENT); return HBRUSH(GetStockObject(HOLLOW_BRUSH)); } return hbr;