Visual C++ and MFC Programming 2nd Edition

(Martin Jones) #1

Visual C++ and MFC Fundamentals Chapter 17: Track-Based Controls


m_UpDown.SetValue(88);
}

To get the value of an UpDown control, call its GetValue() method.

When using the UpDown control by clicking one of its buttons, its value increases or
decreases by one. If you want a different incremental value, specify it using the
Increment edit box.

To programmatically set an incremental value, call the SetIncrement() method. Here is
an example:

void CDlgSpin:: OnConfigureUpDown()
{
// TODO: Add your control notification handler code here
m_UpDown.SetMin(12);
m_UpDown.SetMax(250);

m_UpDown.SetValue(88);

m_UpDown.SetIncrement(5);
}

To know what increment value an UpDown control is using, call its GetIncrement()
method.

Practical Learning: Using UpDown Controls



  1. Right-click in the middle of the dialog box and click Insert ActiveX Control

Free download pdf