POINT points[6]={(100,110),(272,10),(472,10),(644,110),(472,210),(272,210)}; points[0].x=100;
points[0].y=110;
points[1].x=272;
points[1].y=10;
points[2].x=472;
points[2].y=10;
points[3].x=644;
points[3].y=110;
points[4].x=472;
points[4].y=210;
points[5].x=272;
points[5].y=210;
pDC->Polygon(points,5);
用这几个数字画的少了一个边各位帮忙修改指点一二 谢谢啦!
points[0].y=110;
points[1].x=272;
points[1].y=10;
points[2].x=472;
points[2].y=10;
points[3].x=644;
points[3].y=110;
points[4].x=472;
points[4].y=210;
points[5].x=272;
points[5].y=210;
pDC->Polygon(points,5);
用这几个数字画的少了一个边各位帮忙修改指点一二 谢谢啦!
pts[0].x = rect.left + rect.Width()/2;
pts[0].y = rect.top; pts[1].x = rect.right;
pts[1].y = rect.top + rect.Height()/2; pts[2].x = pts[0].x;
pts[2].y = rect.bottom; pts[3].x = rect.left;
pts[3].y = pts[1].y; // Calling Polygon() on that array will draw three lines
// between the points, as well as an additional line to
// close the shape--from the last point to the first point
// we specified.
pDC->Polygon(pts, 4);