IMixerPinConfig::SetRelativePosition method (mpconfig.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 SetRelativePosition method sets the position of the stream in the display window.

Syntax

HRESULT SetRelativePosition(
  [in] DWORD dwLeft,
  [in] DWORD dwTop,
  [in] DWORD dwRight,
  [in] DWORD dwBottom
);

Parameters

[in] dwLeft

Value specifying the x-coordinate in the upper-left corner of the display window.

[in] dwTop

Value specifying the y-coordinate in the upper-left corner of the display window.

[in] dwRight

Value specifying the x-coordinate in the bottom-right corner of the display window.

[in] dwBottom

Value specifying the y-coordinate in the bottom-right corner of the display window.

Return value

Returns an HRESULT value. Possible values include the following:

Return code Description
E_INVALIDARG
Coordinates not in the {0, 0, 10,000, 10,000} range.
S_OK
Success.

Remarks

This method assumes window coordinates of {0, 0, 10,000, 10,000}. Therefore, if you want your video stream to be rendered in the bottom right quarter of the display window, you would call this method with the parameters {5,000, 5,000, 10,000, 10,000}.

Note  Values greater than 10,000 are invalid and will cause an error.
 

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 mpconfig.h
Library Strmiids.lib

See also

Error and Success Codes

IMixerPinConfig Interface

IMixerPinConfig::GetRelativePosition