CProgressBar Class |
Description
The CProgressBar class is used to create and manage a progress bar control. A progress bar 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 with the system highlight color as an operation progresses.
Refer to the documentation that ships with the Microsoft Windows Software Development Kit for more information on the use of progress bar controls.
CProgressBar Members
CProgressBar | CProgressBar();Constructor for the CProgressBar. |
int GetPos() const;Retrieves the current position of the progress bar.
int GetRange(BOOL fWhichLimit, PPBRANGE ppBRange) const;Retrieves the information about the current high and low limits of the progress bar.
int OffsetPos(int nIncrement) const;Advances the current position of a progress bar bt the specified increment and redraws the bar to reflect the new position.
int SetPos(int nNewPos) const;Sets the current position of the progress bar and redraws the bar to reflect the new position.
int SetRange(short nMinRange, short nMaxRange) const;Sets the minimum and maximum values for the progress bar and redraws the bar to reflect the new range.
int SetStep(int nStepInc) const;Specifies the step increment for the progress bar, used by StepIt. The default value is 10.
int StepIt() const;Advances the current position of the progress bar by the step increment and redraws the progress bar to reflect the new position.
Overridables
PreRegisterClass | virtual void PreRegisterClass(WNDCLASS &wc);Set the window class parameters before the window is created. |
Base class Members
For base class members, refer to the members of CWnd.
Remarks
Like all common controls, the progress bar control requires a parent window. This parent window is often a dialog, but simple windows can also be the parent window for a progress bar control.
Summary Information
Header file | controls.h |
Win32/64 support | Yes |
WinCE support | Yes |