Professional User Interface Suite, Copyright FOSS Software Inc. Help Published with Permission.

The Prof-UIS menus support the standard Windows sounds when changing menu levels and clicking menu items. The standard PlaySound() API allows you to invoke any appropriate registered sound. Each sound is played in a newly created standalone and absolutely isolated thread. The PlaySound() API often takes the execution control up for half a second if it is invoked for playing the sound asynchronously. It is not possible to use this API in the same thread with the UI thread where the menu is created and tracked. The threads are created even if there are no sounds assigned to menu events in Windows settings because there is no API available to detect whether a sound is assigned. This thread should not cause any problems in your application. But the sound mixer which mixes a menu sound with some other sound stream in the system may bring on a problem depending on the installed drivers. So you can customize and even turn off the sounds. Just create your own sound player class and install it. The CExtSoundPlayer::PlaySound() method is invoked when the certain event is triggered and the sound should be played:

class CSilencePlayer : public CExtSoundPlayer
{
void PlaySound( CExtSoundPlayer::e_ui_sounds_t )
{
// do nothing
}
};

g_SoundPlayer.InstallSoundPlayer( new CSilencePlayer );

You can put this code into the main frame's constructor or application's constructor.