共用方式為


IAMDirectSound::SetFocusWindow

 
Microsoft DirectShow 9.0

IAMDirectSound::SetFocusWindow

The SetFocusWindow method specifies a window to handle sound playback.

Syntax

  HRESULT SetFocusWindow(
  HWND hWnd,
  BOOL bMixingOnOrOff
);

Parameters

hWnd

[in]  Specifies a handle to the window. If this value is NULL, the sound will not be associated with any window.

  • **Note   **Windows NT 4.0 does not support windowless sound playback.

bMixingOnOrOff

[in]  Specifies whether to mix the sound when the window loses focus.

Value Description
TRUE The sound is audible when the window loses focus.
FALSE The sound is not audible when the windows loses focus.

Requirements

Header: Include Amaudio.h.

Library: Use Strmiids.lib.

Return Values

Returns an HRESULT value. Possible values include the following.

Return code Description
E_FAIL Failure.
S_OK Success.

See Also