VB °æ (¾«»ªÇø)

·¢ÐÅÈË: bloom (©À©Á©Â©Ã©Ä©Æ©Ç¨), ÐÅÇø: VB
±ê  Ìâ: APIº¯ÊýʹÓÃÊÖ²áÖ® BitBlt(תÔØ)
·¢ÐÅÕ¾: ¹þ¹¤´ó×϶¡Ïã (2000Äê09ÔÂ07ÈÕ18:35:11 ÐÇÆÚËÄ), ×ªÐÅ

¡¾ ÒÔÏÂÎÄ×ÖתÔØ×Ô cnTemp ÌÖÂÛÇø ¡¿
¡¾ Ô­ÎÄÓÉ catchy Ëù·¢±í ¡¿
·¢ÐÅÈË: espn (С¥һҹÌý´ºÓê), ÐÅÇø: VisualBasic       
·¢ÐÅÕ¾: BBS Ë®Ä¾Ç廪վ (Wed Mar 29 20:35:59 2000)

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


Platforms: Win32s, Win 95/98, Win NT


BitBlt copies a portion of an image from one object to another. This
function preserves the original size and dimensions of the image
piece, unlike the related function StretchBlt. In addition to using
the straight "copy" method, you can specify other ways of copying the
image with the dwRop parameter. What the function actually does is
perform a binary operation on the color of the source and destination
pixel to calculate the color of the pixel in the transfered image. The
point you specify as the location of the copied image in the target
object will be the upper-left corner of the image portion. The
function returns 0 if the function failed and 1 if it succeeded.

hDestDC
The device context of the target object (the one that receives the
image portion).
x
The x coordinate of the point to put the image inside the target.
y
The y coordinate of the point to put the image inside the target.
nWidth
The width of the image portion.
nHeight
The height of the image portion.
xSrc
The x coordinate of the upper-left corner of the image piece in the
source.
ySrc
The y coordinate of the upper-left corner of the image piece in the
source.
dwRop
Exactly one of the following flags specifying what method to use to
copy the source image:
SRCAND = &H8800C6
Logically And the two color values (destination = source And
destination).
SRCCOPY = &HCC0020
Copy the source image exactly (destination = source).
SRCERASE = &H440328
Logically And the source image and the destination's binary inverse
(destination = source And (Not destination).
SRCINVERT = &H660046
Logically Xor the two color values (destination = source Xor
destination).
SRCPAINT = &HEE0086
Logically Or the two color values (destination = source Or
destination).
Example:

' Copy a portion of the image in PictureBox1 to PictureBox2
' The image's dimensions are 16x32
' Source image coordinates: (45,50)-(60,81)
' Target image coordinates: (0,0)-(15,31)

Dim retval As Long  ' function return value

retval = BitBlt(PictureBox2.hdc, 0, 0, 16, 32, PictureBox1.hdc, 45,
50, SRCCOPY)

--
Standing on the bridge that crosses
The river that goes out to the sea,
The wind is full of a thousand voices
They pass by the bridge and me...

--
¡î À´Ô´:£®¹þ¹¤´ó×϶¡Ïã bbs.hit.edu.cn£®[FROM: casi.bbs@smth.org]
--
¡ù ×ªÔØ:£®¹þ¹¤´ó×϶¡Ïã bbs.hit.edu.cn£®[FROM: 202.118.247.254]
[°Ù±¦Ïä] [·µ»ØÊ×Ò³] [Éϼ¶Ä¿Â¼] [¸ùĿ¼] [·µ»Ø¶¥²¿] [Ë¢ÐÂ] [·µ»Ø]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
Ò³ÃæÖ´ÐÐʱ¼ä£º1.897ºÁÃë