SetRange
void SetRange( int nLower, int nUpper )
EX1
#include <Control.h> #include <..\OriginLab\DialogEx.h> #define IDC_SPIN1 1001 void SpinButton_SetRange(Dialog& MyDlg) { SpinButton m_spBtn = MyDlg.GetItem(IDC_SPIN1); m_spBtn.SetRange(2, 14); }
Call this function to set the upper and lower limits (range) for a spin button control.
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.
Control.h