IDDrawExclModeVideoCallback::OnUpdateOverlay method (strmif.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 OnUpdateOverlay method informs the application when the overlay surface for the video is about to become visible, invisible, change size, or change position, so that the application can repaint its window appropriately.

Syntax

HRESULT OnUpdateOverlay(
  [in] BOOL       bBefore,
  [in] DWORD      dwFlags,
  [in] BOOL       bOldVisible,
  [in] const RECT *prcOldSrc,
  [in] const RECT *prcOldDest,
  [in] BOOL       bNewVisible,
  [in] const RECT *prcNewSrc,
  [in] const RECT *prcNewDest
);

Parameters

[in] bBefore

Boolean value specifying whether the call is being made before or after the overlay-related change. TRUE specifies before, FALSE specifies after.

[in] dwFlags

Value from the AM_OVERLAY_NOTIFY_FLAGS enumeration that specifies what is about to change or what changed.

[in] bOldVisible

Boolean value specifying whether the old window is visible. TRUE means the old window is visible.

[in] prcOldSrc

Pointer to the rectangle representing the old source position of the DirectDraw surface.

[in] prcOldDest

Pointer to the rectangle representing the old destination position of the rectangle in the overlay surface.

[in] bNewVisible

Boolean specifying whether the new window is visible. TRUE means the new window is visible.

[in] prcNewSrc

Pointer to the rectangle representing the new source position of the DirectDraw surface.

[in] prcNewDest

Pointer to the rectangle representing the new destination position of the rectangle in the overlay surface.

Return value

Returns an HRESULT value. Possible values include the following.

Return code Description
S_OK
Success.
E_INVALIDARG
Invalid parameter.

Remarks

The application should call this method once before the overlay-related change occurs and once after the changes are done. In the call before the change, the overlay change doesn't happen until the application completes executing this method.

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 strmif.h (include Dshow.h)
Library Strmiids.lib

See also

Error and Success Codes

IDDrawExclModeVideoCallback Interface