楼上说的方法很不错,以下摘自MSDN: CDC::Polyline This method draws a set of line segments connecting the points specified by lpPoints. The lines are drawn from the first point through subsequent points using the current pen.BOOL Polyline( LPPOINT lpPoints, int nCount ); Parameters lpPoints Pointer to an array of POINT structures or CPoint objects to connect. nCount The number of points in the array. This value must be at least two. Return Value Nonzero if the function is successful; otherwise, it is zero.Res Unlike the LineTo method, the Polyline method neither uses nor updates the current position.
234
34420006.2080 2948798.5654 1790.000 0
34420009.2881 2948805.6055 1790.000 0
.....(有234个点)
1578
34420015.3154 2948910.7559 1780.000 0
34420010.1455 2948910.8652 1780.000 0
.....(有1578个点)每个整数表示一条线上面所有点数.
读取到链表,然后MoveTo,LineTo绘制...??求思路 代码..
Polyline(hdc,apt,234);
就OK了 比一个一个MoveTo 然后 LineTo效率高多了
CDC::Polyline
This method draws a set of line segments connecting the points specified by lpPoints. The lines are drawn from the first point through subsequent points using the current pen.BOOL Polyline(
LPPOINT lpPoints,
int nCount );
Parameters
lpPoints
Pointer to an array of POINT structures or CPoint objects to connect.
nCount
The number of points in the array. This value must be at least two.
Return Value
Nonzero if the function is successful; otherwise, it is zero.Res
Unlike the LineTo method, the Polyline method neither uses nor updates the current position.