Share via


Spin Button Member Functions

OverviewSample

There are several member functions available for the spin control (). Use these functions to change the following attributes of the spin button.

  • Acceleration   You can adjust the rate at which the position changes when the user holds down the arrow button. To work with acceleration, use the and member functions.

  • Base   You can change the base (either 10 or 16) used to display the position in the caption of the buddy window. To work with the base, use the and member functions.

  • Buddy Window   You can dynamically set the buddy window. To query or change which control is the buddy window, use the and member functions.

  • Position   You can query and change the position. To work directly with position, use the and member functions. Since the caption of the buddy control may have changed (for example, in the case that the buddy is an edit control), GetPos retrieves the current caption and adjusts the position accordingly.

  • Range   You can change the maximum and minimum positions for the spin button. By default, the maximum is set to 0, and the minimum is set to 100. Since the default maximum is less than the default minimum, the actions of the arrow buttons is counter-intuitive. Typically, you will set the range using the member function. To query the range use .

See Also   Windows Common Controls and MFC Classes