Results 1 to 5 of 5

Thread: BitBlt SRCINVERT

  1. #1

    Thread Starter
    Hyperactive Member Wak's Avatar
    Join Date
    Nov 2000
    Location
    Brisbane, Queensland
    Posts
    298

    BitBlt SRCINVERT

    Hey
    I have a form, and the user can doodle and do all kinds of stuff on it. However... I want to be able to invert the colour of the form. (its backcolour is white) And I don't wanna use the GetPixel; SetPixelV sorta thing, cause I already figured that one out and it takes yonks, and its way dodge 'ey...

    If you know how to do it using BitBlt your a champ.. paste it here.

    Oh n when u use bitBlt can the sourceDC and the DestinationDC be the same DC or do u need to make a copy of it to use as the sourceDC???

    Thanx
    Visual Basic 6.0 Enterprise
    Visual C++ 6.0 Professional

    Wak

  2. #2
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650
    Use the vbSrcInvert parameter (just pass that to bitblt)

    u can read and write to the same picturebox with bitblt

  3. #3

    Thread Starter
    Hyperactive Member Wak's Avatar
    Join Date
    Nov 2000
    Location
    Brisbane, Queensland
    Posts
    298

    ...

    Im doing that hey, using the defined constant from API but it's not inverting, lol. It just looks the same.
    Visual Basic 6.0 Enterprise
    Visual C++ 6.0 Professional

    Wak

  4. #4
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650
    VB Code:
    1. Public Const DSINVERT = &H550009
    2.  
    3. BitBlt Picture1.hdc, 0, 0, Picture1.Width, Picture1.Height, Picture1.hdc, 0, 0, DSINVERT

    Try that

  5. #5

    Thread Starter
    Hyperactive Member Wak's Avatar
    Join Date
    Nov 2000
    Location
    Brisbane, Queensland
    Posts
    298

    :D

    Yup, it worked...

    Code:
    Public Const SRCINVERT = &H660046
    I was using that constant before... what is the difference between the two?
    Visual Basic 6.0 Enterprise
    Visual C++ 6.0 Professional

    Wak

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