dopes anyone know how to use the MaskBlt API function?
Printable View
dopes anyone know how to use the MaskBlt API function?
I go through the document already and just have some problem in some parameter :(
What should I pass in for the hbmMask, xMask and yMask?Code:Public Declare Function MaskBlt Lib "gdi32" Alias "MaskBlt" (ByVal hdcDest As Long, ByVal nXDest As Long, ByVal nYDest As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hdcSrc As Long, ByVal nXSrc As Long, ByVal nYSrc As Long, ByVal hbmMask As Long, ByVal xMask As Long, ByVal yMask As Long, ByVal dwRop As Long) As Long
Is the hbmmask is the handle for the Mask bitmap? If yes, how do i create this?
regards,
Chris.C
You create a B&W representation of the real img, white being not drawn, black being drawn.
hbmMask is probably a bitmap reference.
You could use the Image property of a picturebox control as this parameter.
You could also just use BitBlt to do the same, in both cases you'll need 2 images (or at least 2 sections in an image) anyways...
If you want to know how to do it, just type 'BitBlt' and 'Masks' in the same reply, and you'll get blown away by URL's ;)