在VC里,假如我建立了一个窗口,在这个窗口的EraseBkground里加载了一副图片,那么如何让这副图片从左到右平滑地移动呢?

解决方案 »

  1.   

    BOOL BitBlt(
      HDC hdcDest, // handle to destination device context
      int nXDest,  // x-coordinate of destination rectangle's upper-left 
                   // corner
      int nYDest,  // y-coordinate of destination rectangle's upper-left 
                   // corner
      int nWidth,  // width of destination rectangle
      int nHeight, // height of destination rectangle
      HDC hdcSrc,  // handle to source device context
      int nXSrc,   // x-coordinate of source rectangle's upper-left 
                   // corner
      int nYSrc,   // y-coordinate of source rectangle's upper-left 
                   // corner
      DWORD dwRop  // raster operation code
    );
     改变nXDest就可水平移动