Add a EditBox and a spin control to the dlg: Set the spin control property: In Style page: check"Auto buddy"and "Set buddy integer"Add a variable to dlg using Classwizard: CSpinButtonCtrl m_ctlSpin; Add the following in OnInitDialog() m_ctlSpin.SetBuddy(GetDlgItem(IDC_EDIT1)); m_ctlSpin.SetRange(0,100);
Set the spin control property:
In Style page:
check"Auto buddy"and "Set buddy integer"Add a variable to dlg using Classwizard:
CSpinButtonCtrl m_ctlSpin;
Add the following in OnInitDialog()
m_ctlSpin.SetBuddy(GetDlgItem(IDC_EDIT1));
m_ctlSpin.SetRange(0,100);