Compartilhar via


CProgressCtrl::OffsetPos

Advances the progress bar control's current position by the increment specified by nPos and redraws the bar to reflect the new position.

int OffsetPos( 
   int nPos  
);

Parameters

  • nPos
    Amount to advance the position.

Return Value

The previous position of the progress bar control.

Example

CProgressCtrl myCtrl;

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

// Offset the position by one-fourth of the total range. 
int nLower, nUpper;
myCtrl.GetRange(nLower, nUpper);
myCtrl.OffsetPos((nUpper-nLower)/4);   

Requirements

Header: afxcmn.h

See Also

Reference

CProgressCtrl Class

Hierarchy Chart

CProgressCtrl::SetPos

CProgressCtrl::SetRange

CProgressCtrl::StepIt