采用GDI绘图
HDC hdc;//设备场景DC
PAINTSTRUCT ps;
HEPN hPen;
HPEN hPenOld;
hdc = BeginPaint( hWnd , &ps );
hPen = CreatePen( PS_SOLID , 3 , RGB( 255 , 0 , 0 );
hPenOld = ( HPEN )SelectObject ( hdc , hPen );
MoveToEx ( hdc , 20 , 10 , NULL );
LineTo( hdc , 200 ,100);
SelectObject (hdc , hPenOld);
DeleteObject ( hPen );
EndPaint ( hWnd , &ps );