SLM QUERYSCALETEXT
This message queries for the text associated with a tick mark for the primary scale and copies that text into a buffer.
Syntax
param1 USHORT usTickNum; /* Tick location. */ USHORT usBufLen; /* Buffer length. */ param2 PSZ pTickText; /* Pointer to the buffer into which to place the text string for the tick mark. */
Parameters
- usTickNum (USHORT) - Input
- Tick location to query for the text.
- usBufLen (USHORT) - Input
- Length of the buffer to copy the text into. The buffer size should include space for the null termination character.
- pTickText (PSZ) - Input
- Pointer to the buffer into which to place the text string for the tick mark.
Returns
- sTextLen (SHORT) - returns
- Count of bytes copied to buffer.
- >= 0: Length of the text string, excluding the null termination character.
- SLDERR_INVALID_PARAMETERS: An error occurred. The WinGetLastError function may return the following errors:
- PMERR_INVALID_PARAMETERS
- PMERR_PARAMETER_OUT_OF_RANGE.
Remarks
This message could be used to return text that represents the current position of the slider arm or to query the text for use in ownerdraw mode.
By specifying 0 as the value of the usBufLen parameter and then looking at the value returned in the sTextLen parameter, an application can determine the size of the buffer to allocate for copying the text. An application can then allocate a buffer of this size, adding one byte for the null termination character, and then specify this buffer and size on the query call.
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.