|Microsoft DirectX 9.0|
Changes the clipping rectangle for a sample.
HRESULT SetRect ( const RECT *pRect );
[in] Pointer to a RECT structure that specifies the stream's new clipping rectangle.
Returns one of the following values.
|DDERR_INVALIDPIXELFORMAT||The stream isn't compatible with the pixel format.|
|DDERR_INVALIDRECT||The specified rectangle is invalid.|
|DDERR_INVALIDSURFACETYPE||The stream isn't compatible with the surface.|
|E_POINTER||One of the pointers is invalid.|
|MS_E_SAMPLEALLOC||The stream format doesn't match the surface and samples are currently allocated to the stream.|
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.