directdraw中的问题,背景SURFACE使用blt出现错误
gohan 2008-07-21 04:25:26 我看的是那本windows编程大师技巧,他的demo7_8中,执行到blt的函数就没有了响应,是不是调用方法不太兼容比较新的dx
我用的是vista sp1 +vs2008+dx9.0 sdk
DDBLTFX ddbltfx; // the blitter fx structure
// use the blitter to erase the back buffer
// first initialize the DDBLTFX structure
DDRAW_INIT_STRUCT(ddbltfx);
// now set the color word info to the color we desire
ddbltfx.dwFillColor = 0;
// make the blitter call
if (FAILED(lpddsback->Blt(NULL, // pointer to dest RECT, NULL for whole thing
NULL, // pointer to source surface
NULL, // pointer to source RECT
DDBLT_COLORFILL | DDBLT_WAIT,
// do a color fill and wait if you have to
&ddbltfx))) // pointer to DDBLTFX holding info
return(0);