Поделиться через


Using CSpinButtonCtrl

The spin button control (also called an up-down control) provides a pair of arrows that the user can click to adjust a value. This value is called the current position. The position stays within the range of the spin button. When the user clicks the up arrow, the position moves toward the maximum; and when the user clicks the down arrow, the position moves toward the minimum.

The spin button control is represented in MFC by class CSpinButtonCtrl.

ПримечаниеПримечание.

The default range for the spin button has the maximum set to zero (0) and the minimum set to 100. Since the maximum value is less than the minimum value, clicking the up arrow will decrease the position and clicking the down arrow will increase it. Use CSpinButtonCtrl::SetRange to adjust these values.

Typically, the current position is displayed in a companion control. The companion control is called the "buddy window." For an illustration of a spin button control, see About Up-Down Controls in the Windows SDK.

What do you want to know more about?

См. также

Основные понятия

Controls (MFC)