Manipulating the Progress Control

HomeOverviewSample

There are three ways to change the current position of a progress control (CProgressCtrl).

To change the position by a preset amount

  1. Use the SetStep member function to set the increment amount. By default, this value is 10. This value is typically set as one of the initial settings for the control. The step value can be negative.

  2. Use the StepIt member function to increment the position. This causes the control to redraw itself.

    Note   StepIt will cause the position to wrap. For example, given a range of 1 – 100, a step of 20, and a position of 90, StepIt will set the position to 10.

To change the position by an arbitrary amount

To change the position to a specific value

Typically, the progress control is used solely for output. To get the current position without specifying a new value, use GetPos.

See Also   Windows Common Controls and MFC Classes