CRgn(HRGN) SetWindowRgn setRgn{ CRgn rgnRect; CRgn rgnHole; //获取窗口大小 CRect rcWnd; GetWindowRect(&rcWnd); //创建区域 rgnRect.CreatRectRgn(0,22, rcWnd.Width(),

rWnd.Height()); rgnHole.CreateEllipticRgn(50, 50, 100, 100); //区域运算 rgnRect.CombineRgn(&rgnRect, &rgnHole, RGN_XOR); SetWindowRgn(rgnRect, TRUE); } setBmpRgn(int nID); {CClientDC dc(this); CBitmap bmp; bmp.LoadBitmap(nID);

CDC dcBmp; dcBmp.CreateCompatibleDC(&dc); CBitmap * pOldBmp = dcBmp.SelectObject(&bmp); CRect rcWnd; GetWindowRect(&rcWnd); //创建区域 rgnRect.CreatRectRgn(0,0, rcWnd.Width(),

rWnd.Height());

rgnRect.CreateRectRgn(nx, ny, nx+1, ny+1);

05-11 17:30