Click to return to the Reusing Browser Technology home page    
IHTMLTxtRange::moveToPoin...     IHTMLTxtRange::pasteHTML ...     IHTMLTxtRange Interface    
Web Workshop  |  Reusing Browser Technology

IHTMLTxtRange::parentElement Method


Retrieves the parent element for the given text range. The parent element is the element that completely encloses the text in the range.

Syntax

HRESULT parentElement(
    IHTMLElement **Parent 
);

Parameters

Parent
Address of a variable that receives an interface pointer for the parent element.

Return Value

Returns S_OK if successful, or an error code otherwise.

Remarks

If the text range spans text in more than one element, the method returns the smallest element that encloses all the elements. When you insert text into a range that spans multiple elements, the text is placed within the parent element rather than in any of the contained elements.

Windows CE

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

See Also

IHTMLElement


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.