BitBlt Help Please.

OK, so I have spent hours trying to figure this out. I have been trying to implement BitBlt too animate a .bmp for a simple game. I am trying to use a sprite sheet and the code below is what I have. I have been pulling my hair out trying to figure this out if someone could possibly tell me what I am doing wrong I would greatly appreciate the help.

My sprite sheet is called "mosesSheet.bmp"
And the mask is "mosesMask.bmp"



HDC bitmapHDC = CreateCompatibleDC(0);

HBITMAP previousBitmapHandle = (HBITMAP)SelectObject(bitmapHDC, L"mosesmask.bmp");

BitBlt(hdc, 20, 20, 260, 281, bitmapHDC , 0 , 0, SRCPAINT);

SelectObject(bitmapHDC, L"mosesSheet.bmp");

BitBlt(hdc, 20, 20, 260, 281, bitmapHDC ,0 , 0, SRCAND );

SelectObject(bitmapHDC,previousBitmapHandle);

DeleteDC(bitmapHDC);
Topic archived. No new replies allowed.