Jump to content
  • Advertisement
Sign in to follow this  
doody

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.

If you intended to correct an error in the post then please contact us.

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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!