我在鼠标的move事件里面用transparentblt拷贝一个几十像素长宽的位图,发现在毒龙的机器上面跑得很慢,请问有没有高效一点的实现拷贝透明位图的办法,msdn上说好像有个只用bitblt拷贝透明位图的办法,但是我没找到

解决方案 »

  1.   

    BOOL TransparentBlt(
      HDC hdcDest,        // handle to destination DC
      int nXOriginDest,   // x-coord of destination upper-left corner
      int nYOriginDest,   // y-coord of destination upper-left corner
      int nWidthDest,     // width of destination rectangle
      int hHeightDest,    // height of destination rectangle
      HDC hdcSrc,         // handle to source DC
      int nXOriginSrc,    // x-coord of source upper-left corner
      int nYOriginSrc,    // y-coord of source upper-left corner
      int nWidthSrc,      // width of source rectangle
      int nHeightSrc,     // height of source rectangle
      UINT crTransparent  // color to make transparent
    );UINT crTransparent //指定为白色即可。$FFFFFF
      

  2.   

    可是transparentblt执行效率很低啊