Freigeben über


CProgressCtrl::SetRange

Sets the upper and lower limits of the progress bar control's range and redraws the bar to reflect the new ranges.

void SetRange(
   short nLower,
   short nUpper 
);
void SetRange32(
   int nLower,
   int nUpper 
);

Parameters

  • nLower
    Specifies the lower limit of the range (default is zero).

  • nUpper
    Specifies the upper limit of the range (default is 100).

Remarks

The member function SetRange32 sets the 32-bit range for the progress control.

Example

CProgressCtrl myCtrl;

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

// Set the range to be 0 to 100.
myCtrl.SetRange(0, 100);   

Requirements

Header: afxcmn.h

See Also

Reference

CProgressCtrl Class

Hierarchy Chart

CProgressCtrl::OffsetPos

CProgressCtrl::SetPos

CProgressCtrl::StepIt

Other Resources

CProgressCtrl Members