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

  • Live Event Date: August 14, 2014 @ 2:00 p.m. ET / 11:00 a.m. PT Data protection has long been considered "overhead" by many organizations in the past, many chalking it up to an insurance policy or an extended warranty you may never use. The realities of today makes data protection a must-have, as we live in a data-driven society -- the digital assets we create, share, and collaborate with others on must be managed and protected for many purposes. Check out this upcoming eSeminar and join Seagate Cloud …

  • Managing your company's financials is the backbone of your business and is vital to the long-term health and viability of your company. To continue applying the necessary financial rigor to support rapid growth, the accounting department needs the right tools to most efficiently do their job. Read this white paper to understand the 10 essentials of a complete financial management system and how the right solution can help you keep up with the rapidly changing business world.

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds