IDirectDrawStreamSample::SetRect method (ddstream.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.]
Syntax
HRESULT SetRect(
[in] const RECT *pRect
);
Parameters
[in] pRect
Pointer to a RECT structure that specifies the stream's new clipping rectangle.
Return value
Returns one of the following values.
Return code | Description |
---|---|
|
The stream isn't compatible with the pixel format. |
|
The specified rectangle is invalid. |
|
The stream isn't compatible with the surface. |
|
One of the pointers is invalid. |
|
The stream format doesn't match the surface and samples are currently allocated to the stream. |
|
Success. |
Remarks
Both parameters are optional; set either to NULL to avoid changing that value. If the surface format doesn't match the stream format, this method fails.
If the new rectangle's size isn't the same as the current rectangle, a call to this method will fail.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | ddstream.h |