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

  • On-demand Event Event Date: September 10, 2014 Modern mobile applications connect systems-of-engagement (mobile apps) with systems-of-record (traditional IT) to deliver new and innovative business value. But the lifecycle for development of mobile apps is also new and different. Emerging trends in mobile development call for faster delivery of incremental features, coupled with feedback from the users of the app "in the wild." This loop of continuous delivery and continuous feedback is how the best mobile …

  • Packaged application development teams frequently operate with limited testing environments due to time and labor constraints. By virtualizing the entire application stack, packaged application development teams can deliver business results faster, at higher quality, and with lower risk.

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds