Share via


IVideoWindow::SetWindowPosition (Compact 2013)

3/26/2014

This method sets the position of the video window (not the client rectangle position) in device coordinates.

Syntax

HRESULT SetWindowPosition(
  long Left,
  long Top,
  long Width,
  long Height
);

Parameters

  • Left
    [in] Specifies the x-axis origin of the window.
  • Top
    [in] Specifies the y-axis origin of the window.
  • Width
    [in] Width of the window.
  • Height
    [in] Height of the window.

Return Value

Returns an HRESULT value.

Remarks

This method has the same effect as individually calling the IVideoWindow::put_Left, IVideoWindow::put_Top, IVideoWindow::put_Width, and IVideoWindow::put_Height methods.

Specify, in window coordinates, where the video should appear.

For example, setting a destination of (100,50,200,400) positions the video playback at an origin of 100 pixels from the left of the client area and 50 pixels from the top, with an overall size of 200 x 400 pixels.

If the video is smaller (or if a source rectangle is specified that is smaller than the video), the video is stretched appropriately.

If the video is larger, the video is compressed into the visible rectangle.

There are fairly severe performance penalties if an application does not keep the source and destination rectangles the same size.

Under typical circumstances, when no destination rectangle has been set, the video fills the entire visible client window area (regardless of how much the user has stretched the window). The destination rectangle properties correctly return the size of the video window client area.

Requirements

Header

dshow.h

Library

Strmiids.lib

See Also

Reference

IVideoWindow Interface