SPBM_QUERYVALUE
Appearance
This message causes the component to show the value in the spin field.
Syntax
param1 PVOID pStorage; /* Place for returned value. */ param2 USHORT usBufSize; /* Buffer size. */ USHORT usValue; /* Update/reset value. */
Parameters
- pStorage (PVOID) - input
- Place for returned value.
- A place for the returned value. This value is either the address of a
- string or the address of a long variable.
- If the usBufSize is 0, param1 is assumed to be an address of a long variable.
- If param1 is Other, it is assumed to be an address of a string.
- NULL: Causes the spin button to process the reset or update as specified, but
- it will not try to return a value to the application.
- Other: The address where the value is returned.
- A place for the returned value. This value is either the address of a
- usBufSize (USHORT) - input
- Buffer size.
- If usBufSize is too small to return all of the text, the spin button returns
- as much of the text as it can.
- 0: The spin button assumes that param1 is the address of a long variable.
- If the data in the spin button is spinning between an upper and lower limit, the
- current value is passed back in the variable.
- If the data in the spin button is in an array, the index of the current array
- value (or last valid value) is passed back in the variable.
- If the data in the spin button is spinning between an upper and lower limit, the
- Other: The spin button assumes that param1 is the address of a string. The
- information passed back in the string is dependent upon the flags in the usValue parameter.
- If usBufSize is too small to return all of the text, the spin button returns
- usValue (USHORT) - input
- Update/reset value.
- Controls how the spin field is updated.
- SPBQ_UPDATEIFVALID: Update the contents of the spin field if the value is
- valid. This is the default.
- Specifying this flag on a query will not update the contents of the spin
- field if it is exactly the same as an item in the spin button list.
- If an item in the list is Monday, specifying SPBQ_UPDATEIFVALID updates the
- spin field contents when MONDAY, monday, or mONDAY are typed, but not when Monday is
- typed. This prevents recursion if the application checks for the validity each
- time a SPBN_CHANGE message is sent from the component.
- SPBQ_ALWAYSUPDATE: Update the contents of the spin field if the value is valid.
- Reset the contents of the spin field to the last valid value if the field
- contains data that is not valid.
- If the spin button is spinning numbers between an upper and a lower limit,
- and the content of the spin field is a valid number that is out of range, the spin
- button does not reset itself to the last valid value. It sets the current position
- at the upper limit when the out-of-range number specified is above the upper limit.
- It sets the current position at the lower limit when the out-of-range number is
- below the lower limit.
- When the current value is changed, the return of the query message is still
- FALSE.
- SPBQ_DONOTUPDATE: Do not update the contents of the spin field, even if the
- value is valid.
Returns
- rc (BOOL) - return
- Success indicator.
- TRUE: Successful completion.
- FALSE: Error occurred.
Remarks
The application sends this message to the component to determine what value is in the spin field. The application sets up a field for the component to deposit the value, and sets a flag to determine what the function does when the value matches or does not match the given spin-list values. TRUE is returned when a matched value is found, or the data is in the range. FALSE is returned when no match is found, the value is out of range, or no spin data exists.
Default Processing
The default window procedure does not expect to receive this message and takes no action other than to return FALSE.