different linestyles with closely spaced points

Hello All,

I wish to draw a dashed line with coordinates that are closely spaced.

for cntr:=0 to 50 do

The above code comes out as a straight, undashed line, because the
points are too close together.
I know this example is trivial, in my real application there are no
straight lines. However, I don't want to have to parse through the
points and plot every nth point, I would prefer if there were a command
that accepted all my points and then figured out where it should make
the dashes. Is there a winAPI that I can use that does the drawing
properly. I tried polyline and that doesn't work either.