Click to return to the Reusing Browser Technology home page    
IHTMLTxtRange::collapse M...     IHTMLTxtRange::duplicate ...     IHTMLTxtRange Interface    
Web Workshop  |  Reusing Browser Technology

IHTMLTxtRange::compareEndPoints Method


Compares two end points and returns -1, 0, or 1 for less than, equal to, or greater than, respectively.

Syntax

HRESULT compareEndPoints(
    BSTR how,
    IHTMLTxtRange *SourceRange,
    long *ret
);

Parameters

how
String (BSTR) describing the end points to compare. It can be one of the following values:

StartToEnd Compares start point of the current range to the end point of the given range.
StartToStart Compares start point of the current range to the start point of the given range.
EndToStart Compares end point of the current range to the start point of the given range.
EndToEnd Compares end point of the current range to the end point of the given range.

SourceRange
Interface pointer of the range object against which the current range is to be compared.
ret
Address of a long variable that receives the result of the comparison. It can be one of the following values:

-1 End point of SourceRange is less than that of the current range.
0 End point of SourceRange is equal to that of the current range.
1 End point of SourceRange is greater than that of the current range.

Return Value

Returns S_OK if successful, or an error code otherwise.

Remarks

A text range has two end points. One end point is located at the beginning of the text range, while the other is located at the end of the text range. An end point also can be characterized as the position between two characters in an HTML document.

Windows CE

Windows CE Use version 2.12 and later
Minimum availability Internet Explorer 4.0

See Also

setEndPoint


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.