Share via


CProgressCtrl::GetStep

Retrieves the step increment for the progress bar of the current progress bar control.

int GetStep() const;

Return Value

The step increment of the progress bar.

Remarks

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

This method sends the PBM_GETSTEP message, which is described in the Windows SDK.

Requirements

Header: afxcmn.h

This control is supported in Windows Vista and later.

Additional requirements for this method are described in Build Requirements for Windows Vista Common Controls.

Example

The following code example defines the variable, m_progressCtrl, that is used to programmatically access the progress bar control. This variable is used in the next example.

  // Variable to access the progress control
    CProgressCtrl m_progressCtrl;

The following code example retrieves the step increment of the current progress bar control.

// Get the step increment for the progress control.
    CString str;
    int incr = m_progressCtrl.GetStep();
    str.Format(_T("The step increment is %d."), incr);
    AfxMessageBox(str, MB_ICONEXCLAMATION);

See Also

Reference

CProgressCtrl Class

Hierarchy Chart

PBM_GETSTEP

CProgressCtrl::StepIt

CProgressCtrl::SetStep

Using CProgressCtrl