CProgressCtrl::SetStep

Specifies the step increment for a progress bar control.

int SetStep(
   int nStep 
);

Parameters

  • nStep
    New step increment.

Return Value

The previous step increment.

Remarks

The step increment is the amount by which a call to CProgressCtrl::StepIt increases the progress bar's current position.

The default step increment is 10.

Example

CProgressCtrl myCtrl;

// Create a child progress control.
myCtrl.Create(WS_CHILD|WS_VISIBLE, CRect(10,10,200,30), pParentWnd, 
   IDC_PROGRESSCTRL);

// Set the size to be 1/10 of the total range.
int nLower, nUpper;
myCtrl.GetRange(nLower, nUpper);
myCtrl.SetStep((nUpper-nLower)/10);   

Requirements

Header: afxcmn.h

See Also

Reference

CProgressCtrl Class

Hierarchy Chart

CProgressCtrl::OffsetPos

CProgressCtrl::SetPos

CProgressCtrl::StepIt

CProgressCtrl::GetStep

Other Resources

CProgressCtrl Members