Sound volume?

Hello, i've been trying to get and set windows sound volume using API calls
from the mmsystem. I have been playing with waveoutvolumeSet and
waveoutvolumeGet. I have had some success, but it is behaving strangely. Can
anyone tell me a reliable way of changing the right and left wave volumes
using TTrackBar components (i'm using delphi 6, but i expect its very
similar in all versions)? I also need to read the volume back from windows
so that my application does not get confused if windows changes the volume
when it is running. The ideal outcome would be two bars, one for the left
channel and one for the right, that would dynamically both read and change
the wave volume.

Also, in the windows volume changing box (sndvol32) there are sound output
bars that show the current sound output and fluctuate with the volume
changes of sound coming from windows. Is there any way to have a similar bar
in my application? i spent a lot of time looking through the mmsystem
documentation (mm.hlp) but found nothing at all.

As always, any help would be greatly appreciated.

Jeff.