1、memDC.FillRect(client,&BkBrush);//绘制背景 这个BkBrush不会就是白色吧?2、MSDN said: The TransparentBlt function supports all formats of source bitmaps. However, for 32 bpp bitmaps, it just copies the alpha value over. 你TransparentBlt的不是32位bitmap吧?
BOOL TransparentBlt( int xDest, int yDest, int nDestWidth, int nDestHeight, CDC* pSrcDC, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, UINT clrTransparent ); // 此函数同样具有缩放功能,但此函数最后一个参数用来指定作为透明色的RGB;//把最后一个参数换成白色的RGB试试看
这个BkBrush不会就是白色吧?2、MSDN said:
The TransparentBlt function supports all formats of source bitmaps. However, for 32 bpp bitmaps, it just copies the alpha value over.
你TransparentBlt的不是32位bitmap吧?
int xDest,
int yDest,
int nDestWidth,
int nDestHeight,
CDC* pSrcDC,
int xSrc,
int ySrc,
int nSrcWidth,
int nSrcHeight,
UINT clrTransparent
); // 此函数同样具有缩放功能,但此函数最后一个参数用来指定作为透明色的RGB;//把最后一个参数换成白色的RGB试试看
在绘制到设备DC上,如果用TransparentBlt 的话,会闪烁,而且会影响背景颜色。因为必须TransparentBlt 必须指定透明颜色......
你说得很对,正是这个问题.......我4楼也给你说了,呵呵,别人帮你看问题,顶多说下思路,一般不会亲自去帮你调试,还需要你自己去试
因为我要手动绘图,为了防止闪烁,就做了两次缓冲。图像做透明是在CDC mem上面,设备pDC跟背景又做了一个CDC memDC缓冲。不知道你有何高见????
在此请教一问题:
http://bbs.csdn.net/topics/390849854?page=1#post-397924195
vs2010 如何实现 preview and thumbnail 在新建mfc向导里面设置了,但没有效果。
http://bbs.csdn.net/topics/390849854?page=1#post-397924195
vs2010 如何实现 preview and thumbnail 在新建mfc向导里面设置了,但没有效果。