Original Post
I''m trying to display 2 bitmaps in my program, but after
I display 1, the other one displays the same bitmap as the first.
Is there something I have to add to display multiple bitmaps?
Here''s my code:
void Display_Bitmaps(HDC hdc)
{
BITMAP bm;
title = LoadBitmap(GetModuleHandle(NULL),
MAKEINTRESOURCE(TITLE_ID));
HDC hdcMem = CreateCompatibleDC(hdc);
SelectObject(hdcMem,title);
GetObject(title, sizeof(bm), &bm);
BitBlt(hdc, 230, 30, 580, 270, hdcMem, 0, 0, SRCCOPY);
DeleteDC(hdcMem);
DeleteObject(title);
//The above works and displays the bitmap
//But the below doesn''t work- it doesn''t display the other bitmap
BITMAP bm2;
score = LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(SCORE));
HDC hdcMem2 = CreateCompatibleDC(hdc);
SelectObject(hdcMem2,score);
GetObject(score, sizeof(bm2), &bm2);
BitBlt(hdc, 20,500,bm2.bmWidth,bm2.bmHeight, hdcMem2, 0, 0, SRCCOPY);
DeleteDC(hdcMem2);
DeleteObject(score);
}
Any help would be great!