Setting the Range and Current Position (Windows Embedded CE 6.0)

1/6/2010

The range of a progress bar represents the entire duration of the operation, and the current position represents the progress that the application has made toward completing the operation. The window procedure uses the range and the current position of the progress bar to determine the percentage of the progress bar to fill with the highlight color, as well as to determine what text, if any, to display within the progress bar.

If you do not set the range values, the system sets the minimum value to zero and the maximum value to 100. You can adjust the range to convenient integers by using the PBM_SETRANGE message.

A progress bar provides several messages that you can use to set the current position. The PBM_SETPOS message sets the position to a specified value. The PBM_DELTAPOS message advances the position by adding a specified value to the current position. The PBM_SETSTEP message enables you to specify a step increment for a progress bar. Subsequently, when you send the PBM_STEPIT message to the progress bar, the current position advances by the specified increment. The default step increment is 10.

Note

The range values in a progress bar are considered signed integers. Any number that is greater than 0x7FFFFFFF is interpreted as a negative number.

See Also

Concepts

Creating a Progress Bar
Working with Common Controls