Partager via


TransformRect method

Changes a rectangle's relative frame of reference from one coordinate system to another.

Syntax

HRESULT retVal = object.TransformRect(pRect, eSource, eDestination, pIElement);

Parameters

  • pRect [in, out]
    Type: RECT

    A pointer to a variable of type RECT that specifies the rectangle to transform and receives the new rectangle after transformation.

  • eSource [in]
    Type: COORD_SYSTEM

    A COORD_SYSTEM value that specifies the current frame of reference for the rectangle.

  • eDestination [in]
    Type: COORD_SYSTEM

    A COORD_SYSTEM value that specifies the new frame of reference to which the rectangle's current coordinates should be transformed. This parameter cannot be set to COORD_SYSTEM_CONTENT.

  • pIElement [in]
    Type: IHTMLElement

    A pointer to an IHTMLElement interface that specifies the relative element when eSource is set to COORD_SYSTEM_CONTENT.

Return value

Type: HRESULT

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