Freigeben über


IVideoWindow::SetWindowPosition

 
Microsoft DirectShow 9.0

IVideoWindow::SetWindowPosition

The SetWindowPosition method sets the position of the video window.

Syntax

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

Parameters

Left

[in] Specifies the x-coordinate, in pixels.

Top

[in] Specifies the y-coordinate, in pixels.

Width

[in] Specifies the width, in pixels.

Height

[in] Specifies the height, in pixels.

Return Values

Possible return values include the following:

Value Description
E_INVALIDARG Invalid argument.
S_OK Success.
VFW_E_NOT_CONNECTED The video renderer filter is not connected.

Remarks

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

If resizing the window to the specified dimensions is impossible, this method modifies the window's size and location to make the window fit. Call the IVideoWindow::GetWindowPosition method to determine the result.

Requirements

Header: Declared in Control.h; include Dshow.h.

Library: Use Strmiids.lib.

See Also