描述:
我没有使用缓冲,MEMDC直接刷到OVERLAY表面,看起来是有重绘了黑色透明背景。
BitBlt(hdcSurf, Pos.left, Pos.top, Pos.right - Pos.left, Pos.bottom - Pos.top, MemDC, Pos.left, Pos.top, SRCCOPY);
// Set the flags we'll send to UpdateOverlay
dwUpdateFlags = DDOVER_SHOW;
// Does the overlay hardware support source color keying?
// If so, we can hide the black background around the image.
// This probably won't work with YUV formats
memset(&ovfx, 0, sizeof(ovfx));
ovfx.dwSize = sizeof(ovfx);
//dwUpdateFlags |= DDOVER_KEYSRCOVERRIDE;
ovfx.dckSrcColorkey.dwColorSpaceLowValue=0; // black as the color key
ovfx.dckSrcColorkey.dwColorSpaceHighValue=0;
// Update the overlay parameters.
Rd.left = Rs.left;
Rd.right = Rs.right;
Rd.top = Rs.top;
Rd.bottom = Rs.bottom;
ddrval = g_pDDSOverlay->UpdateOverlay(&Rs, g_pDDSPrimary, &Rd, dwUpdateFlags, &ovfx);