Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Get master volume level

Posted on 2003-02-26
3
Medium Priority
?
940 Views
Last Modified: 2008-01-09
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.
0
Comment
Question by:asmcmrr
  • 2
3 Comments
 
LVL 1

Author Comment

by:asmcmrr
ID: 8023751
PS : I'm using VB5
0
 
LVL 2

Accepted Solution

by:
IrishPheremone earned 750 total points
ID: 8064815
0
 
LVL 1

Author Comment

by:asmcmrr
ID: 8077876
This works, but the lack of actual explanation only merits a "C". Thanks for the info :)
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question