MFC擦除对话框背景使之透明 但是对话框内图片无法随对话框移动刷新
我用的是HBRUSHCClipDlg::OnCtlColor(CDC*pDC,CWnd*pWnd,UINTnCtlColor){HBRUSHhbr=CDialog::On...
我用的是
HBRUSH CClipDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
pDC->SetBkMode(TRANSPARENT);
return hbr;
}
BOOL CClipDlg::OnEraseBkgnd(CDC* pDC)
{
return true;
//return CDialog::OnEraseBkgnd(pDC);
} 展开
HBRUSH CClipDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
pDC->SetBkMode(TRANSPARENT);
return hbr;
}
BOOL CClipDlg::OnEraseBkgnd(CDC* pDC)
{
return true;
//return CDialog::OnEraseBkgnd(pDC);
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询