Sign in to follow this  
doody

Question about POINT, polygons, and VC++ 6

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]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this