Results 1 to 5 of 5

Thread: bitblt - error!!!!

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2001
    Location
    USA
    Posts
    1,026

    bitblt - error!!!!

    Hello all,

    I seem to be having a little bit of a problem with bitblt - no pun intended!! Here is my call -->

    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 Const SRCCOPY = &HCC0020

    and here is how I'm trying to use it

    Private Sub Command1_Click()
    bitblt(picture2.hDC,0,0,32,32,picture1.hDC,0,0,srccopy)
    End Sub

    I keep getting an "expected: =" error... What do I need???

    Thanx for the help!

    Squirrelly1
    Now happily married and still crankin' away at the keyboard. Life is grand for a coder, no?

  2. #2
    You have to do:
    VB Code:
    1. temp = bitblt(picture2.hDC,0,0,32,32,picture1.hDC,0,0,srccopy)
    Or
    VB Code:
    1. bitblt picture2.hDC,0,0,32,32,picture1.hDC,0,0,srccopy

  3. #3
    Addicted Member drewski's Avatar
    Join Date
    Feb 2000
    Location
    WA
    Posts
    242
    bitblt should work the way he had it. he just needed to leave the parenthesis off for it to work. other wise the computer thinks you're trying to assign the value returned by bitblt to something when it's clear that is not what you are doing.

    hope this clarifies.


    Drewski
    I see said the blind man as he spat into the wind.

    It all comes back to me now!

    A.D.T.'s VB

  4. #4
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Also use the vbSrcCopy constant instead of srccopy.
    Looks better
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2001
    Location
    USA
    Posts
    1,026

    Thanx Every1

    Thank you every1 for your help...


    Squirrelly1
    Now happily married and still crankin' away at the keyboard. Life is grand for a coder, no?

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