GetWindowRect(hWnd, &wnd);
hdc = BeginPaint(hWnd, &ps);
hdcMem = CreateCompatibleDC(hdc);
for (int i = 0; i < n; ++i)
{
HRGN rgn = CreateRoundRectRgn(0, 0, CARD_WIDTH, CARD_HEIGHT, 7, 7);
SetWindowRgn(cards[info[i].card], rgn, TRUE);
oldBitmap = SelectObject(hdcMem, cards[info[i].card]);
GetObject(cards[info[i].card], sizeof(bitmap), &bitmap);
BitBlt(hdc, info[i].pos.x, info[i].pos.y, bitmap.bmWidth, bitmap.bmHeight, hdcMem, 0, 0, SRCCOPY);
SelectObject(hdcMem, oldBitmap);
}
I have problem with cutting corners for bitmap picture.
Thanks to Jonathan Potter.