CProgressCtrl::SetPos

int SetPos( int nPos );

Return Value

The previous position of the progress bar control.

Parameters

nPos

New position of the progress bar control.

Remarks

Sets the progress bar control’s current position as specified by nPos and redraws the bar to reflect the new position.

The position of the progress bar control is not the physical location on the screen, but rather is between the upper and lower range indicated in SetRange.

Example

CProgressCtrl myCtrl;

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

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

// Set the position to be half, 50.
myCtrl.SetPos(50);

CProgressCtrl OverviewClass MembersHierarchy Chart

See Also   CProgressCtrl::OffsetPos, CProgressCtrl::SetRange, CProgressCtrl::StepIt