FPC_SetSoundVolume
Syntax
HRESULT WINAPI FPC_SetSoundVolume(
HFPC hFPC,
DWORD dwVolume
);Description
The FPC_SetSoundVolume function sets the audio playback volume for all Flash sounds played by the control instance associated with hFPC.
dwVolume must be in the range 0 to DEF_MAX_FLASH_AUDIO_VOLUME.
The constant DEF_MAX_FLASH_AUDIO_VOLUME is defined in f_in_box.h.
A value of 0 mutes all audio, while DEF_MAX_FLASH_AUDIO_VOLUME sets the maximum volume.
See also FPC_GetSoundVolume.
Example
HFPC hFPC = FPC_LoadRegisteredOCX();
if (hFPC)
{
// Set volume to 50% of maximum
HRESULT hr = FPC_SetSoundVolume(hFPC, DEF_MAX_FLASH_AUDIO_VOLUME / 2);
if (SUCCEEDED(hr))
{
// Volume successfully set
}
}