?
Solved

Get master volume level

Posted on 2003-02-26
3
Medium Priority
?
929 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month10 days, 16 hours left to enroll

770 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