- B -


BitBlt Function

Declare Function BitBlt Lib "gdi32.dll" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long

BitBlt transfers one part of a graphic image from one object to another. The original size and dimensions of the graphic chunk is preserved. You will have to manually refresh the object (using the object.Refresh method) for the image to be updated on the screen. It is safe to ignore the value returned.
hDestDCThe device context of the target object.
xThe x coordinate to use as the upper-left corner of the graphic chunk in the target.
yThe y coordinate to use as the upper-left corner of the graphic chunk in the target.
nWidthThe width of the graphic chunk in pixels.
nHeightThe height of the graphic chunk in pixels.
hSrcDCThe device context of the source object.
xSrcThe x coordinate of the upper-left corner of the graphic chunk in the source.
ySrcThe y coordinate of the upper-left corner of the graphic chunk in the source.
dwRopA Blt flag telling how to transfer the image.

Example:
  'Copy the upper-left corner from one picture to another
  x = BitBlt(picTarget.hdc, 0, 0, 32, 32, picSource.hdc, 0, 0, SRCCOPY)
  picTarget.Refresh


Related Call: StretchBlt
Category: Graphics
Back to the top.


Home
Paul Kuliniewicz
E-mail: Borg953@aol.com
All material presented on these pages is Copyright © Paul Kuliniewicz, except for other copyrighted material.
http://members.aol.com/Borg953/api/b.html