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: October 29, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Are you interested in building a cognitive application using the power of IBM Watson? Need a platform that provides speed and ease for rapidly deploying this application? Join Chris Madison, Watson Solution Architect, as he walks through the process of building a Watson powered application on IBM Bluemix. Chris will talk about the new Watson Services just released on IBM bluemix, but more importantly he will do a step by step cognitive …

  • Live Event Date: October 29, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT It's well understood how critical version control is for code. However, its importance to DevOps isn't always recognized. The 2014 DevOps Survey of Practice shows that one of the key predictors of DevOps success is putting all production environment artifacts into version control. In this eSeminar, Gene Kim will discuss these survey findings and will share woeful tales of artifact management gone wrong! Gene will also share examples of how …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds