Share via


IBasicVideo::SetDestinationPosition 方法 (control.h)

[與此頁面 相關的功能 DirectShow 是舊版功能。 它已被 MediaPlayerIMFMediaEngineMedia Foundation 中的音訊/視訊擷取取代。 這些功能已針對 Windows 10 和 Windows 11 進行優化。 Microsoft 強烈建議新程式代碼盡可能使用 MediaPlayerIMFMediaEngine音訊/視訊擷取 ,而不是 DirectShow。 Microsoft 建議盡可能重寫使用舊版 API 的現有程式代碼,以使用新的 API。]

方法 SetDestinationPosition 會設定目的矩形。

語法

HRESULT SetDestinationPosition(
  [in] long Left,
  [in] long Top,
  [in] long Width,
  [in] long Height
);

參數

[in] Left

指定 x 座標,以像素為單位。

[in] Top

以像素為單位指定 Y 座標。

[in] Width

指定寬度,以像素為單位。

[in] Height

指定高度,以像素為單位。

傳回值

傳回 HRESULT 值。 可能的值如下。

傳回碼 Description
E_INVALIDARG
無效引數。 寬度高度 必須大於零。
S_OK
此方法已成功。
VFW_E_NOT_CONNECTED
影片轉譯器未連接。

備註

這個方法的效果與個別呼叫 IBasicVideo::p ut_DestinationLeftIBasicVideo::p ut_DestinationTopIBasicVideo::p ut_DestinationWidthIBasicVideo::p ut_DestinationHeight 方法相同。

規格需求

需求
最低支援的用戶端 Windows 2000 Professional [僅限傳統型應用程式]
最低支援的伺服器 Windows 2000 Server [僅限桌面應用程式]
目標平台 Windows
標頭 control.h (包含 Dshow.h)
程式庫 Strmiids.lib

另請參閱

錯誤和成功碼

IBasicVideo 介面