Click here to Skip to main content
15,902,198 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
in mfc for drawing i have polygon i have to fill the polygon with one color and only border with black or white . how to do that for polygon in mfc cdc class. could you please suggest me.

What I have tried:

CPen cPen(PS_SOLID, 0, RGB(255, 255, 255));
		pDC->SelectObject(&cPen);
Posted
Updated 25-Apr-17 21:23pm

1 solution

Create a pen and a brush and select them into the CDC before drawing the polygon.

See CDC::Polygon[^] for example code.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900