HBRUSH CInvoicestub::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if(nCtlColor == CTLCOLOR_STATIC )
{
pDC->SetBkMode(TRANSPARENT);//设置背景透明
return (HBRUSH)::GetStockObject(NULL_BRUSH);
}
return hbr;
}
在类中添加OnCtlColor