GetPointsFromPenData
1.0 2.0
Retrieves a
specified range of points.
BOOL GetPointsFromPenData( HPENDATA hpndt,
UINT iStrk, UINT iPnt, UINT cPnts,
LPPOINT lppt )
Parameters
hpndt
Handle to a
pen data object.
iStrk
The
zero-based stroke index from which points are retrieved.
iPnt
First point
to retrieve from the specified stroke.
cPnts
Number of
points to retrieve. If this value is 0, the function returns TRUE.
lppt
Address of
buffer to fill with points.
Return Value
Returns TRUE
if successful, or FALSE if the requested points are out of range.
Comments
GetPointsFromPenData performs a function similar to GetPenDataStroke
An
application can also request a copy of a particular subset of points within a
stroke. In this case, iPnt identifies the first point and cPnts
is the number of points to retrieve. This allows an application to digest the
points in an HPENDATA block a few at a time to avoid having to allocate
a large block of memory for the entire set of points.
GetPointsFromPenData returns the last point in a stroke if the iPnt
argument is set to a value larger than the total number of points in the
stroke. In the same manner, the function returns the points of the last stroke
if iStrk exceeds the total number of strokes in the HPENDATA
block. If the count of points to return is 1 and iPnt is beyond the last
point in the stroke, the function returns the last point in the stroke.
See Also