windows_programming_notes.nbk: Home | Index | Next Page: PBM_SETRANGE32 | Previous Page: PBM_SETPOS


 PBM_SETRANGE

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

To send this message, call the SendMessage function as follows.

Syntax

    lResult = SendMessage(         // returns LRESULT in lResult
        (HWND) hWndControl,        // handle to destination control
        (UINT) PBM_SETRANGE,       // message ID
        (WPARAM) wParam,           // = (WPARAM) 0; not used, must be zero
        (LPARAM) lParam            // = (LPARAM) MAKELPARAM (nMinRange, nMaxRange)
    );

Parameters

Return Value

Returns the previous range values if successful, or zero otherwise. The low-order word specifies the previous minimum value, and the high-order word 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 the range is expressed as an 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.

Message Information


windows_programming_notes.nbk: Home | Index | Next Page: PBM_SETRANGE32 | Previous Page: PBM_SETPOS


Notebook exported on Monday, 7 July 2008, 18:56:50 PM Eastern Daylight Time