不是使用遮罩的那种,我要用VC++做一个印章图片,背景要透明的,这样可以插入word 等文档中,
能显示图片,又不会挡到字。有什么好方法,谢谢。

解决方案 »

  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
    );
    把需要透明的部分弄成crTransparent
      

  2.   

    那应该跟你最后要绘制图像的程序有关吧?比如说word,它绘制的时候不给你做成透明的,你有什么办法?
      

  3.   

    那就算是我画出了透明的图片,但是存储为图片(gif)的时候,又被加了白色的背景,该怎么办那?
    怎么才能存储时,也存成透明的图片呢?
      

  4.   

    插入Word的时候BMP是不可能本身透明的,Word中通过设定透明色来实现透明,与程序无关
      

  5.   

    研究一下透明gif吧,或者32bit 的bitmap