that way of loading bitmaps didn't work. (the LoadBitmap(hInstance, TEXT("ID_PICWHATEVER"));
but this is how i've been doing it:
Code:
bitmapArray[0] = LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(ID_PICWHATEVER));
if (bitmapArray[0] == NULL)
MessageBox(NULL, "Could not load Picwhatever.", "Error", MB_OK | MB_ICONERROR);
but the pics still aren't changing this is my WM_PAINT case:
Code:
case WM_PAINT:
{
BITMAP bm;
PAINTSTRUCT ps;
HDC hdc = BeginPaint(hwnd, &ps);
HDC hdcMem = CreateCompatibleDC(hdc);
HBITMAP hbmOld = SelectObject(hdcMem, bitmapArray[showBmp]);
GetObject(bitmapArray[showBmp], sizeof(bm), &bm);
BitBlt(hdc, 14, 13, bm.bmWidth, bm.bmHeight, hdcMem, 0, 0, SRCCOPY);
SelectObject(hdcMem, hbmOld);
DeleteDC(hdcMem);
EndPaint(hwnd, &ps);
}
break;
i have showBmp declared as an int and initialized to 7; then in an if statement in the check() function, if the guess was incorrect, it does --showBmp; and then SendMessage(hwnd, WM_PAINT, 0, 0); any ideas on what wrong?
thanks.