   Trouble With BitBlt and  Black Background
  Hi, I'm a Java programmer trying to complete a project using C++ in Windows. I'm trying to implement double buffering, I draw to an off-screen hDC, and then blt it to the window DC. It seems to work but when I make the background black, the sprite smears.void Starship:: gameInitialize(HWND hWnd,HINSTANCE hInst){    //For use image loadingHDChDC = GetDC(hWnd);this->hWnd = hWnd;//Double bufferingoffScreenDC= CreateCompatibleDC(hDC);offScreenBitmap = CreateCompatibleBitmap(hDC,640,480);SelectObject(offScreenDC,offScreenBitmap);}void Starship:: gamePaint(HDC hDC){  background->draw(hDC);spriteManager.drawSprites(hDC);}void Starship:: gameCycle(HWND hWnd,HINSTANCE hInstance){//For images  HDC hDC = GetDC(hWnd);  spriteManager.updateSprites();  //Double buffering  Starship::gamePaint(offScreenDC);  BitBlt(hDC, 0, 0, 640,480, offScreenDC, 0, 0,SRCCOPY);    ReleaseDC(hWnd, hDC);}The sprite's draw method is a windows api transparent blt.   
  how did you make the background before as opposed to now when you're making it black?also, if you're using a 32bpp buffer it might have something to do with how TransparentBlt handles the alpha channel. you may need to black-out the buffer with your own routine since the older GDI api calls like FillRect or Rectangle just set it to 0s when it really should be set to 1s.also, consider using GDI+ instead of GDI. it will be more intuitive to you and offers more featuresalso, you need to ReleaseDC hDC in Starship::gameInitialize