Results 1 to 2 of 2

Thread: Bit Blt Quckie

  1. #1

    Thread Starter
    Hyperactive Member MeTTa@'s Avatar
    Join Date
    Aug 2005
    Posts
    312

    Bit Blt Quckie

    Hey guys, im(or was) well familiar with bitblt. Just showing a friend some basic stuff, and it aint workin :P

    Code:
    Public 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 Sub drawBike()
    BitBlt frmMain.hDC, 0, 0, 202, 91, frmMain.picCar.hDC, 0, 0, vbSrcPaint
    End Sub
    
    Public Sub drawBikeMask()
    BitBlt frmMain.hDC, 0, 0, 202, 91, frmMain.picCarMask.hDC, 0, 0, vbSrcAnd
    End Sub
    
    Public Sub drawLand()
    BitBlt frmMain.hDC, 0, 0, 1280, 1024, frmMain.picLand.hDC, 0, 0, vbSrcPaint
    End Sub
    
    Public Sub Update()
    frmMain.Cls
    drawLand
    drawBikeMask
    drawBike
    End Sub
    I got the form/pictures autoredraw=true, and the image just wont mask. It just keeps the solid image.

  2. #2
    Frenzied Member
    Join Date
    Jun 2006
    Posts
    1,098

    Re: Bit Blt Quckie

    Unless your form's BackColor is black, you probably want to use vbSrcCopy for drawLand. Other than that, your code is fine. Could there be a problem with the images? (I'm guessing you have the black/white of the mask reversed)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width