RealOne Player Volume Bar Clone (Almost)

Environment: VC6

Introduction

I love how the volume control of the RealOne player looks, so I decided to include it into my own applications. Because someone else may be interested in using it, here it is!

Note that this code only obtains a value, and does not affect the current audio configuration.

Usage

To use this class, you only have to create the control using the Dialog Editor as an slide bar (and select the desired horizontal/vertical orientation).

Then, using the ClassWizard, link the resource to a CSlideBarCtrl variable. Finally, change the type of this variable (which is in the dialog class definition) from CSlideBarCtrl to CVolumeBar (do not forget the #include!).

To set the volume (the range is 0-100), use the function:

void SetVolume(int volume)

And to get the current volume value, use:

int GetVolume()

Additionally, you can change the background color and the bar color by modifying the public attributes bkColor and barColor.

Future Improvements

The 3D effect on the "thumb" is not yet implemented, and the control would look nicer with it.

Downloads

Download demo project - 16 Kb
Download source - 5 Kb


Comments

  • nice

    Posted by Legacy on 12/22/2003 12:00am

    Originally posted by: deniz

    nice work, needs some refining though..

    Reply
  • Looks Cool !

    Posted by Legacy on 12/18/2003 12:00am

    Originally posted by: Henry

    It looks good. I'm working with .NET now. Do you have any plan to create a C# version of your control? Thanks.

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • The impact of a data loss event can be significant. Real-time data is essential to remaining competitive. Many companies can no longer afford to rely on a truck arriving each day to take backup tapes offsite. For most companies, a cloud backup and recovery solution will eliminate, or significantly reduce, IT resources related to the mundane task of backup and allow your resources to be redeployed to more strategic projects. The cloud - can now be comfortable for you – with 100% recovery from anywhere all …

  • A help desk is critical to the operations of an IT services business. As a centralized intake location for technical issues, it allows for a responsive and timely solution to get clients and their staff back to business as usual. In addition to handling immediate IT issues, a help desk performs several proactive tasks to ensure clients' IT systems remain operational and downtime is minimized. Thus, utilizing a help desk and following best practices can improve the productivity, efficiency and satisfaction of …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds