TransparentBlt 在双缓冲绘图下有关问题!
TransparentBlt 在双缓冲绘图下问题!!!!
view里:
OnDraw下
------解决思路----------------------
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吧?
view里:
OnDraw下
CDC memDC;
CBitmap memBitmap;
CBitmap* pOldBitmap;
CRect client;
GetClientRect(client);
memDC.CreateCompatibleDC(pDC);
memBitmap.CreateCompatibleBitmap(pDC,client.Width().client.Height());
pOldBitmap=memDC.SelectObject(&memBitmap);
memDC.FillRect(client,&BkBrush);//绘制背景
pDoc->Draw(&memDC,this);//在此里面调用TransparentBlt 函数,该透明的地方只变成白色,不能透明,问何缘故????
pDC->BitBlt(......);
------解决思路----------------------
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吧?