You did not specify which version of Windows you are targeting. It makes a big difference if you want to control audio per application.
In Windows 7, you can control the volume per application (well.. stream).
Applications that use ASIO cannot be controlled like this, but if you only care about Windows Media Player that shouldn't be a problem.

You can control the volume (or mute) of streams via the Core Audio API. IAudioEndpointVolume
or ISimpleAudioVolume
interfaces.
However, I would't recommend messing with mixer volumes.
Windows has a mechanism built in that does what you want. It's called ducking
or stream attenuation
, which is meant to lower/mute the volume of all non-communication audio streams when a "communication" stream starts.
In the Windows multimedia control panel (Mmsys.cpl) you can configure the default behavior via on the communications tab:

You'll have to find the default communication device, and play audio through that.
This unit here can help you to find it:
http://code.google.com/p/mfpack-media-foundation/source/browse/trunk/MFPACK/CoreAudio/MMDeviceAPI/MMDeviceApi.pas
From here on I'm not 100% if ducking occurs automatically when you play audio or not.
I didn't try it myself, but hopefully this guides you in the right direction.
Let me know if you book any results.
ps:
If I were you I'd look a bit deeper into mfpack, because it seems to be a useful library for this kind of stuff.
I see that there are 3 comitters for that project (maxcmx, factoryx.code, and peter larson). I'm sure they can tell you how to accomplish your goal the right way.