MFC - Progress Bars


Besides the Progress control, Visual C++ provides two other progress-oriented controls −

  • The Microsoft Progress Control Version 5.0
  • The Microsoft Progress Control Version 6.0

The main difference is in their ability to assume one or two orientations.

Let us look into a simple example.

Step 1 − Right-click on the dialog in the designer window.

Progress Bars

Step 2 − Select Insert ActiveX Control.

Insert ActiveX Control

Step 3 − Select the Microsoft ProgressBar Control 6.0 and click OK

Step 4 − Select the progress bar and set its Orientation in the Properties Window to 1 – ccOrientationVertical

Step 5 − Add control variable for Progress bar.

Progress Bars

Step 6 − Add the following code in the OnInitDialog()


Step 7 − Run this application again and you will see the progress bar in Vertical direction as well.

Progress Bars