Round slider control

I needed a round slider control to let my users enter an angle. I thought this could be useful to others, so I wrote a general class for it using some of the functions from Chris Maunder's CRoundButton class.

To use, simply add a slider to your dialog. Enlarge it until it covers an approximately square area.

In your dialog class, associate a control variable (say m_rscMySlider), with the slider. If you have told class wizard about CRoundSliderCtrl, you will be able to select it when you define the control variable. If not, just go for CSliderCtrl and manually edit the definition in your dialog header file, changing CSliderCtrl to CRoundSliderCtrl. If you do not like using DDX then you can just subclass the control.

In OnInitDialog() you would call SetRange(), SetPos(), etc. to customize the look and feel of the round slider control.

Download demo project - 39.2 Kb



Comments

  • DlolG sjC lBei

    Posted by QdVTNMzuyv on 11/14/2012 12:09am

    buy soma online what is carisoprodol 350 mg side effects - soma online discounts

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

Top White Papers and Webcasts

  • Live Event Date: November 20, 2014 @ 2:00 p.m. ET / 11:00 a.m. PT Are you wanting to target two or more platforms such as iOS, Android, and/or Windows? You are not alone. 90% of enterprises today are targeting two or more platforms. Attend this eSeminar to discover how mobile app developers can rely on one IDE to create applications across platforms and approaches (web, native, and/or hybrid), saving time, money, and effort and introducing apps to market faster. You'll learn the trade-offs for gaining long …

  • 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