Public Group

# Question about POINT, polygons, and VC++ 6

This topic is 5059 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

OK, I'm learning some of the basics of windows GPI and right now I'm trying to draw a polygon using POINT and Polygon(). The author uses the following code:

// create the polygon shown in the figure

POINT poly[7] = {p0x, p0y, p1x, p1y, p2x, p2y,

p3x, p3y, p4x, p4y, p5x, p5y, p6x, p6y,  };

// assume hdc is valid, and pen and brush are selected into

// graphics device context

Polygon(hdc, poly,7);


I figured this would give me an error (I have no clue where p0x... etc, came from), but I tried it anyways. Of course, I got an error saying p0x' : undeclared identifier. I figured as much, so I went to msdn to see how to use POINT and it showed something like Point whatever[] = {Point(0,0),Point(1,1)}; Now, I tried that _thinking_ I had discovered what was wrong, only to get the following error message: error C2661: 'tagPOINT::tagPOINT' : no overloaded function takes 2 parameters I understand the message but what I don't understand is WHY POINT cannot take 2 parameters when in msdn it says it can. Please help! - Stephen EDIT ----- Nevermind, I figured it out [google] [Edited by - doody on August 18, 2004 12:07:30 AM]

1. 1
2. 2
Rutin
18
3. 3
4. 4
5. 5

• 14
• 12
• 9
• 12
• 37
• ### Forum Statistics

• Total Topics
631432
• Total Posts
3000040
×