Microsoft DirectX 9.0


The OnClipChange method provides notification that the window's visible region has changed. It is essential that any overlay hardware be updated to reflect the change to the visible region before returning from this method.


HRESULT OnClipChange(
  const RECT *pSourceRect,
  const RECT *pDestinationRect,
  const RGNDATA *pRgnData



[in] Pointer to the region of the video to use.


[in] Pointer to the video destination.


[in] Pointer to the clipping information.

Return Value

Returns S_OK if successful. If the method fails, it returns an HRESULT error code.


The calls to OnClipChange happen in synchronization with the window. It is called with an empty clip list to freeze the video before the window moves, and then called again when the window has stabilized with the new clip list.

If the window rectangle is all zeros, the window is invisible. As is the case for AVI decoders, the decoder should save the image if it relies on the current image to decode the next one.

See Also