简单方法创建透明区域
CRect areaRect(0, 0, 0, 0);
CRect clientRect(0, 0, 0, 0);
GetClientRect(&clientRect);
CWnd* pWnd = GetDlgItem(IDC_STATIC_TRANS);
if(pWnd && IsWindow(pWnd->m_hWnd))
{
pWnd->GetWindowRect(&areaRect);
ScreenToClient(areaRect);
CRgn crRgn, crRgnTmp;
crRgn.CreateRectRgn(clientRect.left, clientRect.top, clientRect.right, clientRect.bottom);
crRgnTmp.CreateRectRgn(areaRect.left, areaRect.top, areaRect.right, areaRect.bottom);
crRgn.CombineRgn(&crRgn, &crRgnTmp, RGN_XOR);
crRgnTmp.DeleteObject();
SetWindowRgn(crRgn, FALSE);
crRgn.DeleteObject();
}
补充:综合编程 , 其他综合 ,