AddSegment method

Creates an ISegment interface for the content between two markup pointer in a markup container, and adds the segment to the editable selection.

Syntax


HRESULT retVal = object.AddSegment(pIStart, pIEnd, ppISegmentAdded);

Parameters

pIStart [in]

Type: IMarkupPointer

Pointer to an IMarkupPointer interface that specifies the start point for adding the segment.

pIEnd [in]

Type: IMarkupPointer

Pointer to an IMarkupPointer interface that specifies the end point for adding the segment.

ppISegmentAdded [out]

Type: ISegment

Address of a pointer to a variable that receives an ISegment interface pointer to the interface for the added segment in the selection environment.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The selection type (set with the ISelectionServices::SetSelectionType method) must be set to SELECTION_TYPE_Text before a call to ISelectionServices::AddElementSegment.

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.