-
August 9th, 2005, 10:00 PM
#1
Simple Question: XOR a Filled Rectangle? How?
This is embarassing to ask but i have no idea how to draw a filled rectangle in an XOR way into the DC.
I have my FillRect(hdc,&rect,hBrush) but when i try using the oldMode = SetROP2(hdcDesktop,R2_XORPEN); it does not XOR. According to MSDN it mentions that the filled interior should now be XORed but it isnt. Any ideas?
Thanks
-
August 9th, 2005, 10:18 PM
#2
Re: Simple Question: XOR a Filled Rectangle? How?
I'm not familiar with this function so I may be totally off-base here, but the documentation seems to indicate that all SetROP2() does is set the mix mode so that subsequent uses of the pen will have the desired effect. It does not appear to be an immediate update function similar to FillRect().
-
August 9th, 2005, 10:32 PM
#3
Re: Simple Question: XOR a Filled Rectangle? How?
Originally Posted by 0xC0000005
I'm not familiar with this function so I may be totally off-base here, but the documentation seems to indicate that all SetROP2() does is set the mix mode so that subsequent uses of the pen will have the desired effect. It does not appear to be an immediate update function similar to FillRect().
Interesting. I didnt realize that. I hope there is a function to do what want then. I know i can bitblt but i dont want th eextra load of creating a bitmap, mapping to a compatible dc, doing a fillrect into that then bitblt'ing xor...too much for something that should be basic. Thanks for your heads up!
-
August 9th, 2005, 10:42 PM
#4
Re: Simple Question: XOR a Filled Rectangle? How?
Hi again..I figured it out..I had to use the PatBlt function instead of FillRect(..) Thanks for your help
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
|