HRESULT ExtractWithRectangle ( [in] IInkRectangle* rectangle, [in, optional, defaultvalue(IEF_Default)] InkExtractFlags extractFlags, [out, retval] IInkDisp **ExtractedInk );
[Microsoft® Visual Basic® 6.0]
Public Function ExtractWithRectangle( _ rectangle As InkRectangle, _ [extractFlags As InkExtractFlags = IEF_RemoveFromOriginal] _ ) As InkDisp
[in, optional] Specifies the InkExtractFlags enumeration type, which determines whether the ink should be cut or copied from the existing InkDisp object. The default cuts the strokes from the existing InkDisp object.
[out, retval] Returns an InkDisp object that contains the extracted collection of strokes.
|E_POINTER||A parameter contained an invalid pointer.|
|E_INK_EXCEPTION||An exception occurred inside the method.|
|E_INK_SOME_STROKES_NOT_EXTRACTED||Not all strokes were extracted.|
|E_OUTOFMEMORY||Cannot allocate memory to complete the operation.|
|E_INVALIDARG||Invalid extraction flags.|
|REGDB_CLASSNOTREG||The Ink object was not registered.|
This method is useful for creating a new InkDisp object without the deleted or cut strokes from the original object.
To extract strokes from a known collection of strokes, call the ExtractStrokes() method.
Only the portion of a stroke that is within the rectangle is added to the new InkDisp object.
[Visual Basic 6.0]
Dim theNewInk As InkDisp Set theNewInk = theInkCollector.Ink.ExtractStrokes(rectSelection, _ IEF_CopyFromOriginal)