InsertPenData 

2.0     

Merges two blocks of pen data at the specified stroke index.

int InsertPenData( HPENDATA hpndtDst, HPENDATA hpndtSrc, UINT iStrk )

Parameters

hpndtDst

Handle of the pen data object to merge into. When this function returns, this is the handle of the merged data.

hpndtSrc

Handle of the pen data object to merge from.

iStrk

Stroke index. The merge operation occurs before this index. This parameter can also be IX_END to append hpndtSrc to the end of hpndtDst.

Return Value

Returns PDR_OK if successful; otherwise, the return value is one of the following negative values:

Constant

Description

PDR_COMPRESSED

Pen data is compressed.

PDR_ERROR

Parameter or other unspecified error.

PDR_MEMERR

Out of memory.

PDR_OEMDATAERR

Incompatible OEM data in the two pen data objects.

PDR_STRKINDEXERR

Invalid stroke index.

PDR_TIMESTAMPERR

Incompatible time fields in the two pen data objects.

PDR_USERDATAERR

Incompatible user space in the two pen data objects.

PDR_VERSIONERR

Could not convert old pen data object.

 

Comments

InsertPenData merges two blocks of pen data starting at the zero-based stroke index specified by iStrk of the destination pen data.

The blocks of pen data to be merged must be compatible. The calling application should ensure that the blocks of data are in the same scaling mode. The user space, if present, should be of the same size. OEM data, if present, must be compatible and of the same type. The application can use TrimPenData232HBFD to delete certain information from either the source or the destination HPENDATA object to make it compatible. If hpndtDst has timing information and hpndtSrc does not, the merge fails. However, if hpndtDst does not have timing information and hpndtSrc does have it, the timing is stripped from hpndtSrc.

For a description of timing information, see  The HINKSET Object  in Chapter 4,  The Inking Process. 

See Also

InsertPenDataStroke, InsertPenDataPoints, MetricScalePenData, CreatePenDataEx