其他分享
首页 > 其他分享> > WinCE下DirectDraw特效

WinCE下DirectDraw特效

作者:互联网

//左右翻转

DDBLTFX  ddbltfx;  
ZeroMemory(&ddbltfx, sizeof(ddbltfx));
ddbltfx.dwSize = sizeof(ddbltfx);
ddbltfx.dwDDFX = DDBLTFX_MIRRORLEFTRIGHT;
lpPrimarySurface->Blt(NULL,lpBmpSurface,NULL,DDBLT_WAIT | DDBLT_DDFX,&ddbltfx);

//从上到下移动

      RECT rcDest = {0,0,480,0};
      RECT rcSource = {0,272,480,272};
      for(int i=0;i<68;i++)
      {
       rcDest.bottom+=4;
       rcSource.top-=4;
       lpPrimarySurface->Blt(&rcDest, lpBmpSurface, &rcSource, DDBLT_WAIT, NULL);
      }

//从下向上移动

      RECT rcDest = {0,272,480,272};
      RECT rcSource = {0,0,480,0};
      for(int i=0;i<68;i++)
      {
       rcDest.top-=4;
       rcSource.bottom+=4;
       lpPrimarySurface->Blt(&rcDest, lpBmpSurface, &rcSource, DDBLT_WAIT, NULL);
      }

//从左到右移动

      RECT rcDest = {0,0,0,272};
      RECT rcSource = {480,0,480,272};
      for(int i=0;i<120;i++)
      {
       rcDest.right+=4;
       rcSource.left-=4;
       lpPrimarySurface->Blt(&rcDest, lpBmpSurface, &rcSource, DDBLT_WAIT, NULL);
      }

//从右到左移动

 

标签:特效,ddbltfx,272,rcSource,WinCE,rcDest,480,RECT,DirectDraw
来源: https://blog.51cto.com/u_15298588/3034321