Original Post
Hi! Can anyone try to explain why you cannot do like this:
case WM_CREATE:
hdc = GetDC(hWnd);
hLogo = CreateCompatibleDC(hdc);
ReleaseDC(hWnd, hdc);
for (y = 0; y < logo_height; y++)
{
for (x = 0; x < logo_width; x++)
{
HEADER_PIXEL(logo_data, pixel);
SetPixel(hLogo, x, y, RGB(pixel[0], pixel[1], pixel[2]));
}
}
return 0;
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
BitBlt(hdc, 0, 0, logo_width, logo_height, hLogo, 0, 0, SRCCOPY);
EndPaint(hWnd, &ps);