Chapter 18: Progress-Based Controls Visual C++ and MFC Fundamentals
- Close it and return to MSVC
18.3 Progress Bars................................................................................................
18.3.1..Introduction..........................................................................................
Besides the Progress control, Visual C++ provides two other progress-oriented controls:
the Microsoft Progress Control Version 5.0 and the Microsoft Progress Control Version
6.0 with the main difference on their ability to assume one or two orientations.
Practical Learning: Introducing Progress Bars
- Start a new MFC Application named BodyMonitor and create it as Dialog Based
- Delete the TODO line and move the buttons to the bottom section of the dialog
18.3.2..Creating Progress Bars.......................................................................
To add a progress bar to your application, from the Insert ActiveX Control dialog box,
select the desired one. For this lesson, because everything available in Version 5.0 is also
available in Version 6.0, we will use the later.
After adding a progress bar to a parent window, it assumes a horizontal display. This is
controlled by the Orientation property (not available in Version 5.0) whose default value
is 0 – ccOrientationHorizontal. If you want the progress bar to be vertical, change this
property to a 1 – ccOrientationVertical value.
The range of values that a progress bar can assume is set using the Min property for the
minimum value and the Max field for the highest value.
Practical Learning: Creating Progress Bars
- Right-click anywhere on the dialog box and click Insert ActiveX Control
- In the ActiveX Control list of the Insert ActiveX Control dialog box, click Microsoft
ProgressBar Control, version 6.0 and click OK