You may draw yourself (in
handler) using graphic primitives (
) or you may use a chart control, like, for instance, Cedric's High-speed Charting Control
Suppose you have an array of coordinates and want to create a linear graph.
First you have to find
xmin, xmax, ymin, ymax
in order to scale (and translate) all the coordinates to fit into the screen rectangle you intend to use:
x[i] = rcx + rcwidth/(xmax-xmin)* x[i];
y[i] = rcy - rcheight/(ymax-ymin)* y[i];
are the coordinates of the top-left point of the screen rectangle and
are its dimensions.
Finally you have to draw all the lines connecting successive points, e.g.
MoveToEx(hdc, x, y);
for(n=1; n<N; ++n)
LineTo(hdc, x[n], y[n]);