I am going to put a volume scroll bar in one of my apps that I will use as a shell instead of explorer in Win98. There won't be a mouse, so I'm looking to have a "volume up" and a "volume down" key. I already have this functionality in place, via some WINMM.DLL API calls. The problem is that I don't know what the volume level is when I start my app. So my custom volume scroll bar initially doesn't reflect the actual system volume level and the first "volume up" or "volume down" keypress will change the volume based on whatever my initial value for the scoll bar was, as opposed to being based on the actual system volume.
If you want to see the sort of code I'm already using, check the big block of code here : http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_11084305.html
I've tried to make my own kind of inverse to the mixerSetControlDetails function used in the code in the link above (mixerGetControlDetails) which uses CopyStructFromPtr instead of CopyPtrFromStruct and in my mind should copy the system mixer's current volume information into Vol, as Vol.dwValue. But it's always 0.
Can someone come up with a function for me to retrieve the current system mixer volume level? Thanks.