IVideoWindow::SetWindowPosition method (control.h)
[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
The SetWindowPosition
method sets the position of the video window.
Syntax
HRESULT SetWindowPosition(
[in] long Left,
[in] long Top,
[in] long Width,
[in] long Height
);
Parameters
[in] Left
The x-coordinate, in pixels.
[in] Top
The y-coordinate, in pixels.
[in] Width
The width, in pixels.
[in] Height
The height, in pixels.
Return value
Possible return values include the following:
Return code | Description |
---|---|
|
Invalid argument. |
|
Success. |
|
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
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | control.h (include Dshow.h) |
Library | Strmiids.lib |