Block.AddLine(ByVal Pt1 As Long, ByVal Pt2 As Long) As IVdLine
Starting coordinates (packed) of the line.
Ending coordinates (packed) of the line.
As IVdLine. The newly created Line Object.
The two points passed in are packed into two longs, with low word representing the X coordinate and the high word representing the Y coordinate. For example:
MAKELONG(X,Y)The X,Y coordinates are packed into a single long, in accordance with the C++ MAKELONG macro.
For Visual Basic, implement this function as follows:
Function LOWORD(ByVal dw)
If dw And &H8000& Then
LOWORD = dw Or &HFFFF0000
Else
LOWORD = dw And &HFFFF&
End If
End Function
Public Function MAKELONG(LoByte, HiByte)
If HiByte And &H80 Then
MAKELONG = ((HiByte * &H100&) Or LoByte) Or &HFFFF0000
Else
MAKELONG = (HiByte * &H100) Or LoByte
End If
End Function