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

  • "Security" is the number one issue holding business leaders back from the cloud. But does the reality match the perception? Keeping data close to home, on premises, makes business and IT leaders feel inherently more secure. But the truth is, cloud solutions can offer companies real, tangible security advantages. Before you assume that on-site is the only way to keep data safe, it's worth taking a comprehensive approach to evaluating risks. Doing so can lead to big benefits.

  • Mobile is introducing sweeping changes throughout your workplace. As a senior stakeholder driving mobile initiatives in your organization, you may be lost in a sea of technologies and claims from vendors promising rapid delivery of applications to your employees, customers, and partners. To help explain some of the topics you will need to be aware of, and to separate the must-haves from the nice-to-haves, this reference guide can help you with applying a mobile strategy in the context of application …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds