1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
HDC_NEW = CreateCompatibleDC(HDC);
HDCCOPY = CreateCompatibleDC(HDC);
HCOPY[K] = CreateCompatibleBitmap(HDC , 100 , 100);
BITMAP INFO;
GetObject(BITMAP[K] , sizeof(INFO) , & INFO);
MASK[K] = CreateBitmapMask (BITMAP[K], RGB(255, 255, 255));
SaveDC(HDCCOPY);
SelectObject(HDCCOPY , HCOPY[K]);
BitBlt(HDCCOPY , 0 , 0 , 100 , 100 , HDC , X , Y , SRCCOPY);
SelectObject(HDC_NEW , MASK[K]);
BitBlt(HDCCOPY , 0 , 0 , 100 , 100 , HDC_NEW , 0 , 0 , SRCAND);
SelectObject(HDC_NEW , BITMAP[K]);
BitBlt(HDCCOPY , 0 , 0 , 100 , 100 , HDC_NEW , 0 , 0 , SRCPAINT);
SelectObject(HDCCOPY , HCOPY[K]);
BitBlt(HDC , X , Y , 100 , 100 , HDCCOPY , 0 , 0 , SRCCOPY);
|