共用方式為


IElementSegment interface

This interface provides methods that control a fragment of HTML markup in the current editable selection that consists of a single element.

Members

The IElementSegment interface inherits from ISegment. IElementSegment also has these types of members:

  • Methods

Methods

The IElementSegment interface has these methods.

Method Description
GetElement

Retrieves the element to which this segment refers.

IsPrimary

Determines whether the control element represented by this segment is the primary element of a multi-element selection.

SetPrimary

Sets or unsets this control element as the primary element in a control selection.

 

Remarks

To obtain an IElementSegment interface for a fragment of HTML markup representing an element, use the ISelectionServices::AddElementSegment method.

The selection object uses element segments to mark fragments of HTML markup that are whole elements, in particular control elements such as input and img. They are essentially control selections in the editor and their type is SELECTION_TYPE_Control.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

See also

Reference

ISelectionServices

ISegment