|
-
Sep 29th, 2002, 01:30 AM
#1
Thread Starter
Hyperactive Member
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 
-
Sep 30th, 2002, 06:02 PM
#2
Fanatic Member
Use the vbSrcInvert parameter (just pass that to bitblt)
u can read and write to the same picturebox with bitblt
-
Sep 30th, 2002, 06:13 PM
#3
Thread Starter
Hyperactive Member
...
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 
-
Oct 1st, 2002, 05:50 PM
#4
Fanatic Member
VB Code:
Public Const DSINVERT = &H550009
BitBlt Picture1.hdc, 0, 0, Picture1.Width, Picture1.Height, Picture1.hdc, 0, 0, DSINVERT
Try that
-
Oct 1st, 2002, 06:01 PM
#5
Thread Starter
Hyperactive Member
: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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|