This is a simple CProgressCtrl derived class that allows text
to be displayed on top of the progress bar in much the same way
as many "Setup" programs display the progress of long
The control is extremely simple and allows the same operations
as a standard CProgressCtrl, as well as:
void SetShowText(BOOL bShow);
which determines whether or not the text for the control will
be displayed during updates. To set the text to be displayed use
the standard CWnd::SetWindowText.
If you call SetShowText(TRUE)
but do not specify any window text using CWnd::SetWindowText,
then the percentage fraction of progress will be displayed as
To use the control, just include a CProgressCtrl in your app
as per usual (either dynamically or by using a dialog template)
and change the variable type from CProgressCtrl to
CTextProgressCtrl. (Make sure you include TextProgressCtrl.h)
At present the progress is only displayed as a smooth bar.
(This may be changed in the future versions.)
Thanks to Keith Rule for his CMemDC class.
26 May 1998 : Jeremy
Davis added SetForeColour,
SetTextForeColour, SetTextBkColour, GetForeColour, GetBkColour, GetTextForeColour, GetTextBkColour.
|Sets the bar colour of the progress bar.|
|Sets the background colour of the progress bar.|
|Sets the colour of the text when the bar is not
|Set the colour of the text when the bar is covering
|COLORREF GetForeColour()||Returns the bar colour of the progress bar.|
|COLORREF GetBkColour()||Returns the background colour of the progress bar.|
|Returns the colour the the text when the bar is not
|COLORREF GetTextBkColour()||Returns the colour of the text when the bar is
Last updated: 30 May 1998