19,469
社区成员
发帖
与我相关
我的任务
分享
BLENDFUNCTION blend = { AC_SRC_OVER, 0, /*SourceConstantAlpha*/0, AC_SRC_ALPHA };
HDC hdcDesk = ::GetDC(NULL);
HDC hdcMem = ::CreateCompatibleDC(hdcDesk);
RECT rectWnd;
GetWindowRect(&rectWnd);
int iWidth = rectWnd.right-rectWnd.left;
int iHeight = rectWnd.bottom-rectWnd.top;
HBITMAP hBmp = ::CreateCompatibleBitmap(hdcDesk,iWidth,iHeight);
::SelectObject(hdcMem, hBmp);
POINT p = {0,0};
::UpdateLayeredWindow(m_hWnd,hdcDesk, NULL,NULL,hdcMem,&p,0,&blend,ULW_ALPHA)