Share via


CProgressCtrl Class

Provides the functionality of the Windows common progress bar control.

class CProgressCtrl : public CWnd

Members

Public Constructors

Name

Description

CProgressCtrl::CProgressCtrl

Constructs a CProgressCtrl object.

Public Methods

Name

Description

CProgressCtrl::Create

Creates a progress bar control and attaches it to a CProgressCtrl object.

CProgressCtrl::CreateEx

Creates a progress control with the specified Windows extended styles and attaches it to a CProgressCtrl object.

CProgressCtrl::GetBarColor

Gets the color of the progress indicator bar for the current progress bar control.

CProgressCtrl::GetBkColor

Gets the background color of the current progress bar.

CProgressCtrl::GetPos

Gets the current position of the progress bar.

CProgressCtrl::GetRange

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

CProgressCtrl::GetState

Gets the state of the current progress bar control.

CProgressCtrl::GetStep

Retrieves the step increment for the progress bar of the current progress bar control.

CProgressCtrl::OffsetPos

Advances the current position of a progress bar control by a specified increment and redraws the bar to reflect the new position.

CProgressCtrl::SetBarColor

Sets the color of the progress indicator bar in the current progress bar control.

CProgressCtrl::SetBkColor

Sets the background color for the progress bar.

CProgressCtrl::SetMarquee

Turns marquee mode on or off for the current progress bar control.

CProgressCtrl::SetPos

Sets the current position for a progress bar control and redraws the bar to reflect the new position.

CProgressCtrl::SetRange

Sets the minimum and maximum ranges for a progress bar control and redraws the bar to reflect the new ranges.

CProgressCtrl::SetState

Sets the state of the current progress bar control.

CProgressCtrl::SetStep

Specifies the step increment for a progress bar control.

CProgressCtrl::StepIt

Advances the current position for a progress bar control by the step increment (see SetStep) and redraws the bar to reflect the new position.

Remarks

A progress bar control is a window that an application can use to indicate the progress of a lengthy operation. It consists of a rectangle that is gradually filled, from left to right, with the system highlight color as an operation progresses.

A progress bar control has a range and a current position. The range represents the total duration of the operation, and the current position represents the progress the application has made toward completing the operation. The window procedure uses the range and the current position to determine the percentage of the progress bar to fill with the highlight color. Because the range and current position values are expressed as signed integers, the possible range of current position values is from –2,147,483,648 to 2,147,483,647 inclusive.

For more information on using CProgressCtrl, see Controls and Using CProgressCtrl.

Inheritance Hierarchy

CObject

CCmdTarget

CWnd

CProgressCtrl

Requirements

Header: afxcmn.h

See Also

Reference

CWnd Class

Hierarchy Chart

Concepts

MFC Sample CMNCTRL2