CTrackbar.SetPosmethod
Sets the current logical position of the slider in a trackbar.
Syntax
SUB SetPos (BYVAL hTrackbar AS HWND, BYVAL fPosition AS BOOLEAN, BYVAL lPosition AS LONG)
Parameters
| Name | Description | |
|---|---|---|
hTrackbar | Handle to the trackbar control. | |
fPosition | Redraw flag. If this parameter is TRUE, the message redraws the control with the slider at the position given by lPosition. If this parameter is FALSE, the message does not redraw the slider at the new position. Note that the message sets the value of the slider position (as returned by the TBM_GETPOS message) regardless of the fPosition parameter. | |
lPosition | New logical position of the slider. Valid logical positions are the integer values in the trackbar's range of minimum to maximum slider positions. If this value is outside the control's maximum and minimum range, the position is set to the maximum or minimum value. |
Return value
Returns a 32-bit value that specifies the previous page size.
Description
Sets the current logical position of the slider in a trackbar.
Remarks
The trackbar also sends a WM_HSCROLL or WM_VSCROLL message with the TB_PAGEUP and TB_PAGEDOWN notification codes to its parent window when it receives keyboard or mouse input that scrolls the page.
Reference
- Include file
CTrackbar.inc - Defined in AfxNova/CTrackbar.inc:321
- Documented in Windows/WIndows Controls/CTrackbar Class.md
- Topic: CTrackbar Class