Export (0) Print
Expand All

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, 1);

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

See Also

CProgressCtrl Overview | Class Members | Hierarchy Chart | PBRANGE | PBM_GETRANGE

Show:
© 2014 Microsoft