Share via


IVideoWindow::SetWindowPosition

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

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

Windows Embedded CE Windows CE 2.12 and later
Windows Mobile Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later
Note Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements
For more information, see Setting Up the Build Environment, Version 2.12 requires DXPAK 1.0 or later

See Also

Reference

IVideoWindow Interface