Microsoft DirectX 8.1 (C++) |
The SetWindowFocus method sets the window that will handle sound playback for the current media file.
Syntax
HRESULT SetWindowFocus(
HWND hWnd,
BOOL bMixingOnOrOff
);
Parameters
hWnd
[in] Specifies a hHandle to the sound playback window as an HWND. If this value is null, the sound will not be associated with any window.
Note Windows NT 4.0 does not currently support windowless sound playback.
bMixingOnOrOff
[in] Specifies whether to mix the sound as a BOOL.
Value | Description |
TRUE | Mix the sound. |
FALSE | Do not mix the sound. |
Return Values
When successful, the method returns S_OK. Otherwise, the method should return an HRESULTin the following table or another error value indicating the cause of the failure.
Return code | Description |
E_FAIL | No sound device is available. |
E_INVALIDARG | The hWnd argument is invalid. |
E_NOTIMPL | DirectSound isn't installed. |
NOERROR | The method succeeded. |
See Also