• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 415
  • Last Modified:

XOR_PEN

XORPEN is normally used to draw a temporary line and then erasing it. but is there a short sample code on how to use XOR_PEN to draw a line?


Thank you very much! :))
0
nglp
Asked:
nglp
1 Solution
 
ZoppoCommented:
Hi nglp,

this is a simple sample:

CMyView::OnDraw(CDC* pDC)
{
 int oldMode = pDC->SetROP2( R2_XORPEN );
 pDC->MoveTo( 100, 100 );
 pDC->LineTo( 100, 100 );
 pDC->SetROP2( oldMode );
}

hope that helps,

ZOPPO
0

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

Tackle projects and never again get stuck behind a technical roadblock.
Join Now