在这之前背景贴了张jpg, 然后在jpg上贴位图 
贴位图的代码如下  bmp.LoadBitmap(IDB_BITMAP2); 
   
   bmp.GetBitmap(&bmpInfo);
   // Create an in-memory DC compatible with the
   // display DC we're using to paint
   CDC dcMemory;
   dcMemory.CreateCompatibleDC(pDC);    // Select the bitmap into the in-memory DC
   CBitmap* pOldBitmap = dcMemory.SelectObject(&bmp);    // Find a centerpoint for the bitmap in the client area
   CRect rect;
   GetClientRect(&rect);
   ti[i].x +=10;
   int nX =  ti[i].x; 
   int nY = ti[i].y ;    // Copy the bits from the in-memory DC into the on-
   // screen DC to actually do the painting. Use the centerpoint
   // we computed for the target offset.
   pDC->BitBlt(nX, nY, bmpInfo.bmWidth, bmpInfo.bmHeight, &dcMemory, 
   0, 0, SRCAND);     dcMemory.SelectObject(pOldBitmap); 请问为何 ?

解决方案 »

  1.   

    SRCCOPY 应该可以,源位图快复制,这个也透明状态?
      

  2.   

    印象中是的  我一次都湿了一遍  SRCCOPY 失了好几次 我也纳闷呢 
      

  3.   

    SRCAND改成SRCCOPY,回答过了吧。
      

  4.   

    原因如下:
    1.SRCAND应该改为SRCCOPY;
    2.图片复制时的坐标位置,由 
      ti[i].x +=10; 
      int nX =  ti[i].x; 
      int nY = ti[i].y ;
    确定,在x方向有10的偏移-----这是为什么你发现贴上去了,但仍然看到背景的原因.