MFC 对话框 透明控件 怎么总会透明到对话框的后面的窗口的背景上面
比如对话框时红色背景。对话框后面是今日桌面
按钮的背景色怎么会是 今日桌面呢
对话框
OnEraseBkgnd(CDC* pDC)
CRect rect;
GetClientRect(&rect);
pDC->BitBlt(rect.left,rect.top,rect.Width(),rect.Height(),&m_tmpBKDC,0,0,SRCCOPY);
return 1;
按钮控件
OnEraseBkgnd(CDC* pDC)
CRect rect;
this->GetWindowRect(&rect);
this->GetParent()->ScreenToClient(&rect);
pDC->BitBlt(0,0,48,48,this->GetParent()->GetDC(),rect.left,rect.top,SRCCOPY);
return 1;