BitBlt( int x, int y, int nWidth, int nHeight, CDC* pSrcDC, int xSrc, int ySrc, DWORD dwRop ); Parameters x Specifies the logical x-coordinate of the upper-left corner of the destination rectangle. y Specifies the logical y-coordinate of the upper-left corner of the destination rectangle. nWidth Specifies the width (in logical units) of the destination rectangle and source bitmap. nHeight Specifies the height (in logical units) of the destination rectangle and source bitmap. pSrcDC Pointer to a CDC object that identifies the device context from which the bitmap will be copied. It must be NULL if dwRop specifies a raster operation that does not include a source. xSrc Specifies the logical x-coordinate of the upper-left corner of the source bitmap. ySrc Specifies the logical y-coordinate of the upper-left corner of the source bitmap. dwRop Specifies the raster operation to be performed. Raster-operation codes define how the GDI combines colors in output operations that involve a current brush, a possible source bitmap, and a destination bitmap. See BitBlt in the Platform SDK for a list of the raster-operation codes for dwRop and their descriptions
int x,
int y,
int nWidth,
int nHeight,
CDC* pSrcDC,
int xSrc,
int ySrc,
DWORD dwRop
);
Parameters
x
Specifies the logical x-coordinate of the upper-left corner of the destination rectangle.
y
Specifies the logical y-coordinate of the upper-left corner of the destination rectangle.
nWidth
Specifies the width (in logical units) of the destination rectangle and source bitmap.
nHeight
Specifies the height (in logical units) of the destination rectangle and source bitmap.
pSrcDC
Pointer to a CDC object that identifies the device context from which the bitmap will be copied. It must be NULL if dwRop specifies a raster operation that does not include a source.
xSrc
Specifies the logical x-coordinate of the upper-left corner of the source bitmap.
ySrc
Specifies the logical y-coordinate of the upper-left corner of the source bitmap.
dwRop
Specifies the raster operation to be performed. Raster-operation codes define how the GDI combines colors in output operations that involve a current brush, a possible source bitmap, and a destination bitmap. See BitBlt in the Platform SDK for a list of the raster-operation codes for dwRop and their descriptions
memDC = CreateCompatibleDC(vDC);
memDC->BitBlt(.........);//查一下MSDN,找参数,我忘了,把图片放入内存环境
ReleaseDC()//别忘了当你需要移动时
pDC->BitBlt(....x,y,...memDC...);改变x,y等一些的值就可以了,从内存环境拷贝图片到设备环境