hey dose any one have a good example on bitblt or bitmap like where you can have images and cut them up if you have a good one or can tell me what the api is and i can just mess around with it thanks
Printable View
hey dose any one have a good example on bitblt or bitmap like where you can have images and cut them up if you have a good one or can tell me what the api is and i can just mess around with it thanks
To use BitBlt? Try this example. It will first lay your Mask down; and then your Sprite. Call them picMask and picSprite.
Code for a module.
Code for a CommandButton.Code:Declare Function BitBlt Lib "gdi32" (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
Public Const SRCAND = &H8800C6
Public Const SRCCOPY = &HCC0020
Public Const SRCPAINT = &HEE0086
Public Const MERGEPAINT = &HBB0226
Code:BitBlt Form1.hDC, 0, 0, picMask.Width, picMask.Height, picMask.hDC, 0, 0, SRCAND
BitBlt Form1.hDC, 0, 0, picSprite.Width, picSprite.Height, picSprite.hDC, 0, 0, SRCPAINT
where to i pt the x and y stuff at can you give me like a littil example iknow what that is umm ill try something
You mean exaplin each parameter?
The first is the hDC you want to copy to, the next 4 are the Left, Top, Width and Height of where you want the Image copied to. The next 2 are the Left and Top Coordinates of the Image being copied. The last one is the hDC of the Image being copied.