Jump to content

SLM ADDDETENT

From EDM2
Revision as of 22:15, 20 April 2025 by Martini (talk | contribs) (Created page with "This message places a detent along the slider shaft at the position specified on the primary scale. A detent is an indicator that represents a predefined value for a quantity. It does not have to correspond to an increment of the slider. ==Syntax== <PRE> param1 USHORT usDetentPos; Detent position.: param2 ULONG ulReserved; Reserved value, should be 0.: </PRE> ==Parameters== ;usDetentPos (USHORT) - Input : Detent position. : Number of pixels the deten...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This message places a detent along the slider shaft at the position specified on the primary scale. A detent is an indicator that represents a predefined value for a quantity. It does not have to correspond to an increment of the slider.

Syntax

param1
USHORT usDetentPos;   /* Detent position. */

param2
ULONG ulReserved;    /* Reserved value, should be 0. */

Parameters

usDetentPos (USHORT) - Input
Detent position.
Number of pixels the detent is positioned from home.
ulReserved (ULONG) - Input
Reserved value, should be 0.

Returns

ulDetentId (ULONG) - returns
Detent ID.
Unique identifier for the detent being added to the slider. If 0 is returned, an error occurred. The WinGetLastError function may return the following errors:
PMERR_HEAP_MAX_SIZE_REACHED
PMERR_PARAMETER_OUT_OF_RANGE.

Remarks

The application uses this message to add detents along the slider to denote values that do not fall along an increment setting. An example of this would be a slider that represents temperature and has increments that are on multiples of 5. A detent could be located at 32, instead of 30 or 35, for special purposes.

Default Processing

The default window procedure does not expect to receive this message and therefore takes no action on it other than to return 0.