BITMAP not in color when painted, HELP!
I have a bitmap painted fine, but the colors are very low. Like if the pic was one of a regular window, it would only show up in blue, pink, purlse, gray, and white. Here's some code, HELP IF YOU CAN!:
HBITMAP hbmBall;
BITMAP bm;
int ballX, ballY;
void Draw(HDC hdc)
{
HDC hdcMemory;
hdcMemory = CreateCompatibleDC(hdc);
SelectObject(hdcMemory, hbmBall);
BitBlt(hdc, ballX, ballY, bm.bmWidth, bm.bmHeight, hdcMemory, 0, 0, SRCPAINT);
DeleteDC(hdcMemory);
}
// That's the function to load the bitmap, then I call:
case WM_CREATE:
hbmBall = LoadBitmap(g_hInst, "BMP1");
GetObject(hbmBall, sizeof(bm), &bm);
ballX = 0;
ballY = 0;
break;
case WM_PAINT:
PAINTSTRUCT ps;
HDC hdcWindow;
hdcWindow = BeginPaint(hwnd, &ps);
Draw(hdcWindow);
EndPaint(hwnd, &ps);
break;
This all works, but the colors are very weird. What do I do?