windows_programming_notes.nbk: Home | Index | Next Page: PBM_SETRANGE | Previous Page: PBM_GETRANGE


 PBM_SETPOS

Sets the current position for a progress bar and redraws the bar to reflect the new position.

Syntax

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

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

Parameters

Return Value

Returns the previous position.

Remarks

If nNewPos is outside the range of the control, the position is set to the closest boundary.

Do not send this message to a control that has the PBS_MARQUEE style.

Message Information


windows_programming_notes.nbk: Home | Index | Next Page: PBM_SETRANGE | Previous Page: PBM_GETRANGE


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