Share via


GetFlowElement method

Gets the innermost element containing the display pointer that is a flow layout element.

Syntax

HRESULT retVal = object.GetFlowElement(ppLayoutElement);

Parameters

  • ppLayoutElement [out]
    Type: IHTMLElement

    A pointer to a variable that receives an IHTMLElement interface pointer for the containing flow element.

Return value

Type: HRESULT

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

Remarks

A td element is an example of a flow element. To see how IDisplayPointer::GetFlowElement works, consider the following line of HTML, where the display pointer is placed at [dp].

<td>The dog <i>is[dp]</i> blue.</td>

IDisplayPointer::GetFlowElement gets the TD element.

A display pointer is always contained in an element that has flow layout. If none of the elements in the document tree between the body and the element containing the display pointer have flow layout, the body element is returned.