Compartir a través de


IViewObjectPresentFlipSite::GetMetrics method

Returns the position and size of the ActiveX control (in pixels), and the current scale factor that Internet Explorer is applying to the control.

Syntax

HRESULT GetMetrics(
  [out] POINT* *pPos,
  [out] SIZE*  *pSize,
  [out] float* *pScaleX,
  [out] float* *pScaleY
);

Parameters

  • pPos [out]
    The position of the control in pixels, relative to the mshtml window.

  • pSize [out]
    The size of the control that should be created, in pixels. This might be different to the displayed size while manipulations happen.

  • pScaleX [out]
    The X dimension scale factor for the control. For example, if you pinch zoom the page to 200%, then a control will have (2.0f, 2.0f) for the scale factors. A control can use this to appropriately scale UI inside of itself to match the rest of the zooming on the page.

  • pScaleY [out]
    The Y dimension scale factor for the control.

Return value

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

Remarks

The size can then be passed to CreateSurfacePresenterFlip.

The values returned are only valid if called during NotifyRender.

Requirements

Minimum supported client

Windows 10

Minimum supported server

Windows Server 2016

DLL

Mshtml.dll; Edgehtml.dll