Click to See Complete Forum and Search --> : How to Draw a Graph in VC++


October 5th, 1999, 02:28 AM
I want to draw a Pie chart using Vc++, For this i went for the Arc member function to draw. But the parameters of the Arc is confusing me, When i calculate some thing and draw the graph, it is not comming correctly, can you please explain the parameters of Arc, and if possible suggest how to draw a pie chart using vc++. Thnaks in advance

namit swaroop
October 5th, 1999, 03:14 PM
Pls try follwing -
CDC::AngleArc
BOOL AngleArc( int x, int y, int nRadius, float fStartAngle, float fSweepAngle );

Return Value

Nonzero if successful; otherwise 0.

Parameters

x Specifies the logical x-coordinate of the center of the circle.

y Specifies the logical y-coordinate of the center of the circle.

nRadius Specifies the radius of the circle in logical units. This value must be positive.

fStartAngle Specifies the starting angle in degrees relative to the x-axis.

fSweepAngle Specifies the sweep angle in degrees relative to the starting angle.

Christian Junges
October 6th, 1999, 05:08 AM
Before starting "low level" programming I searched the web for graphics packages and I found the Teechart ActiveX control at www.teemach.com. It's really worth the money.

Serguei Batchila
October 6th, 1999, 08:52 AM
You can use CDC::Pie function. It's easy to use. If you have a problem with using it, let mem know and I will send you a sample