Freigeben über


CProgressCtrl::GetRange

Gets the current lower and upper limits, or range, of the progress bar control.

void GetRange( 
   int& nLower,  
   int& nUpper  
);

Parameters

  • nLower
    A reference to an integer receiving the lower limit of the progress bar control.

  • nUpper
    A reference to an integer receiving the upper limit of the progress bar control.

Remarks

This function copies the values of the lower and upper limits to the integers referenced by nLower and nUpper, respectively.

Example

CProgressCtrl myCtrl;

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

// Set the position to be one-fourth of the total range.
int nLower, nUpper;
myCtrl.GetRange(nLower, nUpper);
myCtrl.SetPos((nUpper-nLower)/4);   

Requirements

Header: afxcmn.h

See Also

Concepts

CProgressCtrl Class

CProgressCtrl Members

Hierarchy Chart

PBRANGE

PBM_GETRANGE