AddPointsPenData
1.0 2.0
Adds a set of
data points to the pen data object.
HPENDATA AddPointsPenData( HPENDATA hpendata,
LPPOINT lppt, LPVOID lpvOem, LPSTROKEINFO lpsiNew
)
Parameters
hpendata
Handle to a
pen data object.
lppt
Address of an
array of POINT
lpvOem
OEM data. Can
be set to NULL if there is no additional OEM data. The pen data header
determines how the OEM data is interpreted.
lpsiNew
Address of a STROKEINFO
Return Value
Returns a
handle to the pen data object. Normally, this is the same handle originally
passed to the function. NULL is returned on error. The size of hpendata
is limited to 64K.
Comments
A call to GetPenHwEventData
The STROKEINFO structure indicates the pen
state of the new points that is,
whether the pen is up or down. To avoid unnecessarily creating new strokes in
the HPENDATA block, AddPointsPenData compares the pen state of
the new points with the pen state of the last stroke in the HPENDATA
block. If the new points have the same pen state as the last stroke, the
function appends the points to the last stroke and updates the last STROKEINFO
structure within the HPENDATA block. If the new points have a different
pen state, AddPointsPenData appends them to the HPENDATA block as
a new stroke, along with the STROKEINFO structure pointed to by lpsiNew.
AddPointsPenData does not scale the data points. The calling
application must ensure that the added data points have the same scale as the
rest of the HPENDATA block.
See Also