Creates a new HPENDATA
object that is a subset of an existing object.
int ExtractPenDataStrokes( HPENDATA hpndt, UINT fuExtract, LPARAM lParam, LPHPENDATA lphpndtNew, UINT gmemFlags )
Handle to an existing pen data object.
Extraction options and modifiers. This value can be a combination of one of
the principal EPDS_ options, with an optional comparison modifier, if
appropriate, and the optional EPDS_REMOVE modifier. The flags should be combined using the
The following table gives the principal options. These options specify what
the new pen data object will be based on.
||Based on a handle to an inkset. The EPDS_GT, EPDS_GTE, EPDS_LT, and EPDS_LTE
comparison operators are ignored, because extraction is based on matching the
inkset. (However, EPDS_NOT creates a pen data set with all stroke/inkset
intersections that do not match the provided inkset.)
||Based on complete pen-tip characteristics.
||Based on selected strokes.
||Based on index.
||Based on pen-tip color.
||Based on pen-tip width.
||Based on pen tip nib style.
||Based on user-specific value.
The following table gives the optional comparison modifiers and the optional
||Less than comparison: extract all strokes with attribute less than the value
specified in lParam.
||Less than or equal comparison: extract all strokes with attributes less than
or equal to the value specified in lParam.
||Greater than comparison: extract all strokes with attributes greater than the
value specified in lParam.
||Greater than or equal comparison: extract all strokes with attributes greater
than or equal to the value specified in lParam.
||Negative comparison (alias EPDS_NE): extract all strokes with attributes not
equal to the value specified by lParam. If combined with other EPDS_ constants, reverses the constant meaning (for
example, EPDS_NE | EPDS_LT | EPDS_GT means not less than or not greater than).
If lParam is EPDS_SELECT, EPDS_NOT means extract all unselected strokes.
||Remove matching strokes from source. If this flag is added, any strokes
matching the criteria for extraction are removed from the source pen data.
Meaning is dependent on the value of the fuExtract
parameter, as follows:
||lParam is a handle to an inkset.
||lParam is a pointer to a PENTIP structure to compare. Only equal or not-equal matches are supported. EPDS_LT,
for example, is ignored.
||lParam is not used and should be set to 0.
||lParam is a zero-based stroke index to compare.
||lParam is a pen tip color to compare.
||lParam is a pen tip nib style to compare. Only equal or not-equal matches are
||lParam is a pen tip width to compare.
||lParam is a user-specific value to compare, cast to a double-word value.
Address of a pen data handle if one is to be created; otherwise, NULL.
Flag that specifies whether or not the Windows GlobalAlloc
function should create a shared memory object when the pen data object is
created. This should be either 0 or GMEM_DDESHARE. The GMEM_MOVEABLE and
GMEM_ZEROINIT flags are added to this value, and other GMEM_ flags are ignored.
Returns the number of strokes that match the comparison criteria if
successful, or a negative error value. (The return value can be 0. The maximum is the
largest integer value.) The error value can be one of the following:
||Pen data is compressed.
||Parameter or other unspecified error.
||Invalid inkset and EPDS_INKSET specified.
||Option not available.
||Invalid stroke index.
||EPDS_USER was specified but there is no per-stroke user data.
||Could not convert old pendata.
ExtractPenDataStrokes extracts strokes from an existing pen data object, optionally creating a new
pen data object made up of the extracted strokes. The extraction can be a copy
or move process; that is, the source pen data object can remain the same or
contain only the remaining strokes not moved to the new structure. Modifier flags
specify how the value in lParam
compares with attributes of the pen data strokes (equal by default, greater
than, less than, or none of these three).
is NULL, no pen data object is created. This is useful for modifying the
original pen data object hpndt
(when EPDS_REMOVE specified), or simply for determining a return value
without modifying or creating a pen data object. If lphpndtNew
is not NULL, the flags specified by gmemFlags
are passed to the GlobalAlloc
function when memory for the pen data memory block is created.
If EPDS_REMOVE is specified, any strokes with an attribute matching the
comparison criteria are removed from the source pen data object, regardless of
whether a new pen data is created. In the case of inksets, this may actually generate
more strokes if there are multiple intersections with the inkset within any
To create an HPENDATA
object consisting only of selected strokes:
ExtractPenDataStrokes( hpndt, EPDS_SELECT, 0, &hpndtDst, 0 );
To return the count of selected strokes:
ExtractPenDataStrokes( hpndt, EPDS_SELECT, 0, NULL, 0 );
To delete all but the selected strokes from the source:
ExtractPenDataStrokes( hpndt, EPDS_NOT | EPDS_SELECT | EPDS_REMOVE,
0, NULL, 0 );
To copy strokes 0 through 10 inclusive to a new HPENDATA
ExtractPenDataStrokes( hpndt, EPDS_LTE | EPDS_STROKE, 10,
&hpndtDst, 0 );
To move all but blue strokes to a separate HPENDATA
ExtractPenDataStrokes( hpndt, EPDS_NOT | EPDS_TIPCOLOR | EPDS_REMOVE,
RGB_BLUE, &hpndtDst, 0 );
- Software for developers
Software for Android Developers
- More information resources
Unix Manual Pages
- Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database