Compartilhar via


OnMove method

Called by MSHTML when the element to which a rendering behavior is attached is repositioned or resized on the screen.

Syntax

HRESULT retVal = object.OnMove(rcDevice);

Parameters

  • rcDevice [in]
    Type: RECT

    RECT that specifies the new on-screen coordinates of the element to which a rendering behavior is attached.

Return value

Type: HRESULT

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

Remarks

Note  Currently, this method is not fully supported.

 

An element can move for several reasons. It might move because of changes within the page—scrolling, insertions, deletions, resizing, or changes of properties that affect layout. An element might also move because of changes outside the page—for instance, the user might move windows. This method is currently unreliable with respect to changes outside the page.

This method differs from IHTMLPainter::OnResize in that it gives the on-screen size and location of the rendering behavior's element, whereas IHTMLPainter::OnResize gives only the new size of the element. When a rendering behavior uses the Windows Graphics Device Interface (GDI) for drawing, it is the responsibility of MSHTML to locate the element on screen. When the behavior uses Microsoft DirectDraw and the hardware overlay buffer, a rendering behavior takes on additional responsibility: it must draw itself at the correct location and size.

See also

IHTMLPainter::OnResize