Witam, frgament mojego kodu:
case WM_CREATE:
SetTimer(hWnd, 1, 30, NULL);
hdc = GetDC(hWnd);
memDC = CreateCompatibleDC(hdc);
GetClientRect(hWnd, &ClientRect);
ReleaseDC(hWnd, hdc);
break;
case WM_TIMER:
hdc = BeginPaint(hWnd, &ps);
ClassTimer(hWnd, hdc);
EndPaint(hWnd, &ps);
break;
case WM_LBUTTONDOWN:
OnLButtonDown(LOWORD(lParam), HIWORD(lParam));
break;
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
bitmapa = CreateCompatibleBitmap(hdc, ClientRect.right - ClientRect.left, ClientRect.bottom - ClientRect.top);
SelectObject(memDC, bitmapa);
Paint23(memDC);
BitBlt(hdc, 0,0,ClientRect.right - ClientRect.left, ClientRect.bottom - ClientRect.top, memDC, 0, 0, SRCCOPY);
DeleteObject(bitmapa);
ReleaseDC(hWnd, hdc);
EndPaint(hWnd, &ps);
break;
Wszystko działa pięknie tzn. rysuje się płynnie. Mam problem jedynie z tłem. Gdy rysowałem na ekranie nie używając bitmapy tło było białe, teraz zaś jest czarne. Proszę o porady:) i z góry dziękuję.