有关控件背景透明问题???
对话框背景是用BitBlt在OnPaint时画上去的,里面的控件背景是灰的,我想让背景是透明的,所以在OnCtrlColor里这样写:
HBRUSH CTabPageParam::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
pDC->SetBkMode(TRANSPARENT);
// TODO: Return a different brush if the default is not desired
return hbr;
}
加了一句:pDC->SetBkMode(TRANSPARENT);
实际上只有STATIC背景变透明了(还要在设计时选上sample属性,不知为何,高人指点。)
对话框里的还有以下几种控件:
Slider,radio都没变,应该怎么做啊。