Radial Control

Environment: Win9x, VC6 SP4

I need a software control to simulate and replace a hardware dial control. So I came up with this control. This radial control is derived from CStatic and can be created using the ClassWizard or you can do your own subclassing.

Most of the commands are similar to CSliderCtrl, I may in the future derived this class from CSliderCtrl and send all slider control messages. Currently this control only sends the WM_HSCROLL message when being modified via mouse or keyboard. The reason that the control sends a message is so that the parent has a chance to act on that message.

There is a difference between the current positon and the current angle. The angle is the current position in degrees of the arrow. The current position is the current angle translated into the range that the user has set. For example the current angle could be 0 degrees, but since the user had set the min/max range to be 100/200 respectively, the current position is 100.

The control also reponses to the ON_WM_SYSCOLORCHANGE message so that if the user has changed the colors of the system the control will automatically updates itself.

Downloads

Download demo project and source code - 20 Kb


Comments

  • using the control

    Posted by Legacy on 04/18/2002 12:00am

    Originally posted by: Dug

    Hi there,
    These are really useful dial controls, however one point, probably an easy one.

    I have placed the controls in etc that is fine. Now I want to catch the move message of the contol and do something with the value that it is set. I noticed that there is only a button clicked message handler available for use in the class wizard, do I need to code my own?

    Cheers

    dug

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

Top White Papers and Webcasts

  • Live Event Date: December 11, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT Market pressures to move more quickly and develop innovative applications are forcing organizations to rethink how they develop and release applications. The combination of public clouds and physical back-end infrastructures are a means to get applications out faster. However, these hybrid solutions complicate DevOps adoption, with application delivery pipelines that span across complex hybrid cloud and non-cloud environments. Check out this …

  • Some of the statistics about the growth of enterprise mobility are surprising, not the least of which is the 4X increase in mobile malware from 2013 to 2014. Many employees today not only expect to be able to use their own personal devices at work, but will even contravene policies that restrict personal device use for work.  IT must find the right approach that balances the benefits of mobility with the risks involved.  This on-demand webcast offers steps toward developing a winning mobile strategy, and …

Most Popular Programming Stories

More for Developers

RSS Feeds