VC中有没有画直线的函数,是不是要先Moveto(x1,y1)再Lineto(x2,y2);
MFC里面确实就是这两个。
你还有别的选择,WIN32 API:
BOOL LineTo(
HDC hdc, // device context handle
int nXEnd, // x-coordinate of ending point
int nYEnd // y-coordinate of ending point
);
BOOL MoveToEx(
HDC hdc, // handle to device context
int X, // x-coordinate of new current position
int Y, // y-coordinate of new current position
LPPOINT lpPoint // old current position
);
或者你自己写一个画直线的函数也是可以的。
对先Moveto(x1,y1)再Lineto(x2,y2);