Microsoft DirectX 9.0


The SetWindowForeground method places the video window at the top of the Z order.


HRESULT SetWindowForeground(
  long Focus



Value that specifies whether to give the window focus. Must be one of the following values:

Value Description
OATRUE Give the window focus.
OAFALSE Do not give the window focus.

Return Values

Possible return values include the following:

Value Description
E_INVALIDARG Invalid argument.
S_OK Success.
VFW_E_NOT_CONNECTED The video renderer filter is not connected.

See Also