CSpinButtonCtrl Class
Provides the functionality of the Windows common spin button control.
class CSpinButtonCtrl : public CWnd
Members
Public Constructors
Name |
Description |
---|---|
Constructs a CSpinButtonCtrl object. |
Public Methods
Name |
Description |
---|---|
Creates a spin button control and attaches it to a CSpinButtonCtrl object. |
|
Creates a spin button control with the specified Windows extended styles and attaches it to a CSpinButtonCtrl object. |
|
Retrieves acceleration information for a spin button control. |
|
Retrieves the current base for a spin button control. |
|
Retrieves a pointer to the current buddy window. |
|
Retrieves the current position of a spin button control. |
|
Retrieves the upper and lower limits (range) for a spin button control. |
|
Sets the acceleration for a spin button control. |
|
Sets the base for a spin button control. |
|
Sets the buddy window for a spin button control. |
|
Sets the current position for the control. |
|
Sets the upper and lower limits (range) for a spin button control. |
Remarks
A "spin button control" (also known as an up-down control) is a pair of arrow buttons that the user can click to increment or decrement a value, such as a scroll position or a number displayed in a companion control. The value associated with a spin button control is called its current position. A spin button control is most often used with a companion control, called a "buddy window."
This control (and therefore the CSpinButtonCtrl class) is available only to programs running under Windows 95/98 and Windows NT version 3.51 and later.
To the user, a spin button control and its buddy window often look like a single control. You can specify that a spin button control automatically position itself next to its buddy window, and that it automatically set the caption of the buddy window to its current position. You can use a spin button control with an edit control to prompt the user for numeric input.
Clicking the up arrow moves the current position toward the maximum, and clicking the down arrow moves the current position toward the minimum. By default, the minimum is 100 and the maximum is 0. Any time the minimum setting is greater than the maximum setting (for example, when the default settings are used), clicking the up arrow decreases the position value and clicking the down arrow increases it.
A spin button control without a buddy window functions as a sort of simplified scroll bar. For example, a tab control sometimes displays a spin button control to enable the user to scroll additional tabs into view.
For more information on using CSpinButtonCtrl, see Controls and Using CSpinButtonCtrl.
Inheritance Hierarchy
CSpinButtonCtrl
Requirements
Header: afxcmn.h