PBM_SETRANGE message

Sets the minimum and maximum values for a progress bar and redraws the bar to reflect the new range.

Parameters

wParam

Must be zero.

lParam

The LOWORD specifies the minimum range value, and the HIWORD specifies the maximum range value. The minimum range value must not be negative. By default, the minimum value is zero. The maximum range value must be greater than the minimum range value. By default, the maximum range value is 100.

Return value

Returns the previous range values if successful, or zero otherwise. The LOWORD specifies the previous minimum value, and the HIWORD specifies the previous maximum value.

Remarks

If you do not set the range values, the system sets the minimum value to 0 and the maximum value to 100. Because this message expresses the range as a 16-bit unsigned integer, it can extend from 0 to 65,535. The minimum value in the range can be from 0 to 65,535. Likewise, the maximum value can be from 0 to 65,535.

To set a larger range, call PBM_SETRANGE32.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Commctrl.h

See also

Reference

PBM_GETRANGE

PBM_SETRANGE32