DirectX SDK

DirectDrawSurface7.BltToDC

The DirectDrawSurface7.BltToDC method performs a bit block transfer (blit) to the specified device context.

object.BltToDC( _ 
    hdc As LONG, _ 
    srcRect As RECT, _
    destRect As RECT)

Parameters

object
Object expression that resolves to a DirectDrawSurface7 object.
hdc
Handle of a device context.
srcRect
RECT type that defines the upper-left and lower-right points of the rectangle to blit from on the source surface. If this parameter is an empty RECT type, the entire source surface is used.
destRect
RECT type that defines the upper-left and lower-right points of the rectangle to blit to on the destination surface. If this parameter is an empty RECT, the entire source surface is used.

Error Codes

If the method fails, it can return one of the following:

DDERR_GENERIC
DDERR_INVALIDCLIPLIST
DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS
DDERR_INVALIDRECT
DDERR_NOALPHAHW
DDERR_NOBLTHW
DDERR_NOCLIPLIST
DDERR_NODDROPSHW
DDERR_NOMIRRORHW
DDERR_NORASTEROPHW
DDERR_NOROTATIONHW
DDERR_NOSTRETCHHW
DDERR_NOZBUFFERHW
DDERR_SURFACEBUSY
DDERR_SURFACELOST
DDERR_UNSUPPORTED

Remarks

Because this method often generates an error, instead of setting an error in the error object, the method returns the error code.