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

  • The impact of a data loss event can be significant. Real-time data is essential to remaining competitive. Many companies can no longer afford to rely on a truck arriving each day to take backup tapes offsite. For most companies, a cloud backup and recovery solution will eliminate, or significantly reduce, IT resources related to the mundane task of backup and allow your resources to be redeployed to more strategic projects. The cloud - can now be comfortable for you – with 100% recovery from anywhere all …

  • Ever-increasing workloads and the challenge of containing costs leave companies conflicted by the need for increased processing capacity while limiting physical expansion. Migration to HP's new generation of increased-density rack-and-blade servers can address growing demands for compute capacity while reducing costly sprawl. Sponsored by: HP and Intel® Xeon® processors Intel, the Intel logo, and Xeon Inside are trademarks of Intel Corporation in the U.S. and/or other countries. HP is the sponsor …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds