Using the CProgressCtrl Control

Click here to change the theme.

The CProgressCtrl class can be very easy to use but the documentation does not make it entirely clear how easy it can be. To use it in it's simplest use, it will show progress in terms of percent and the default step increment (10) will increment (step) the progress by 10% at at time. Simply call CProgressCtrl::StepIt after each 10% of progress has completed.

The CProgressCtrl::StepIt return value is the previous position so you can use something like "if (StepIt() >= 100)" to determine if the progress has gone beyond the end, which should not occur. To determine the end normally, we would use the same method used to determine incremental progress.