没什么问题,怎么了? POINT pointbegin; //pointbegin.x=0; //pointbegin.y=0;这两行可以不要 MoveToEx(hdc,10,10,&pointbegin); LineTo(hdc,20,20);
什么问题都没有... 这时pointbegin的值成了在调用MoveToEx之前的当前点坐标
什么问题都没有... 这时pointbegin的值成了在调用MoveToEx之前的当前点坐标
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 // pointer to old current position );把当前坐标设为x, y,并把原来的坐标保存到lpPoint指向的POINT结构体里面返回给caller。
POINT pointbegin;
//pointbegin.x=0;
//pointbegin.y=0;这两行可以不要
MoveToEx(hdc,10,10,&pointbegin);
LineTo(hdc,20,20);
这时pointbegin的值成了在调用MoveToEx之前的当前点坐标
这时pointbegin的值成了在调用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 // pointer to old current position
);把当前坐标设为x, y,并把原来的坐标保存到lpPoint指向的POINT结构体里面返回给caller。