IInkStrokeDisp::SetPoints
4/8/2010
Sets the points of an IInkStrokeDisp object by using an array of X and Y values.
Syntax
HRESULT SetPoints(
[in] VARIANT points,
[in, optional, defaultvalue(ISC_FirstElement)] long index,
[in, optional, defaultvalue(ISC_AllElements)] long count,
[out, retval] long *NumberOfPacketsSet
);
Parameters
points
The array of new points to replace the points in the stroke beginning at index. This is a VARIANT containing an array of Long with the points represented by alternating values of the form x0, y0, x1, y1, x2, y2, etc.For more information about the VARIANT structure, see Using the Automation Library with Windows Mobile Ink.
- index
The zero–based index of the first point in the stroke to be modified. The default value ItemSelectionConstants.ISC_FirstElement, specifies that the first point in the stroke is modified.
- count
The count of points in the stroke to be modified. The default value ItemSelectionConstants.ISC_AllElements, specifies that all points in the stroke are modified.
- NumberOfPacketsSet
The actual number of packets set.
Return Value
Returns the actual number of points set.
HRESULT value | Description |
---|---|
S_OK |
Success. |
E_POINTER |
A parameter contained an invalid pointer. |
E_INVALIDARG |
Invalid index (out of range), or points parameter. Was not in the correct format. |
E_INK_EXCEPTION |
An exception occurred inside the method. |
Remarks
This method does not change the number of points in the stroke. To change the number of points in the stroke, a new stroke must be created, or the stroke must be split.
This method does not provide for truncating the stroke. If the points array contains fewer points than the stroke, the remainder of the points in the stroke are not be modified.
This method does not provide for extending the stroke. If the points array contains more points than the stroke, the extra points are not used. If the count exceeds the number of points in the array, only the number of points in the array are modified.
Due to an issue in Visual Basic 6.0, calling form.refresh
after calling IInkStrokeDisp::SetPoints, does not draw the new stroke. The parent form receives an invalidation request but does not necessarily invalidate child control windows on the form. Therefore, the stroke is not repainted in its modified form. To explicitly invalidate the control, call the Win32 InvalidateRect API.
Requirements
Header | msinkaut.h |
Windows Embedded CE | Windows CE 5.0 and later |
Windows Mobile | Windows Mobile 6 Classic and later, Windows Mobile 6 Professional and later |