VM QUERYMETRICS
Appearance
This message queries for the current size of each value set item or for the spacing between items. The value returned is either the width and height of one item, or the spacing between items.
Syntax
param1 USHORT fMetric; /* Control metric. */ param2 ULONG ulReserved; /* Reserved value, should be 0. */
Parameters
- fMetric (USHORT) - input
- Control metric to be queried with this message. This can be either of the following:
- VMA_ITEMSIZE: If this message attribute is set, the width and height of each item (in pixels) are returned in the usItemWidth and usItemHeight parameters, respectively.
- VMA_ITEMSPACING: If this message attribute is set, the horizontal and vertical spacing between items (in pixels) is returned in the usHorzItemSpacing parameter and in the usVertItemSpacing parameter, respectively.
- ulReserved (ULONG) - input
- Reserved value, should be 0.
Returns
- ulMetric (ULONG) - returns
- Metric value queried for.
- VSERR_INVALID_PARAMETERS: An error occurred. The WinGetLastError function may return the following error:
- PMERR_INVALID_PARAMETERS.
- $\ge$ 0: This value depends on the VMA_* attribute set in the param1 parameter.
- If the VMA_ITEMSIZE attribute is set, the following is returned:
- usItemWidth (USHORT): Width of one value set item, in pixels.
- usItemHeight (USHORT): Height of one value set item, in pixels.
- If the VMA_ITEMSPACING attribute is set, the following is returned:
- usHorzItemSpacing (USHORT): Amount of horizontal space allocated between each value set item, in pixels. This number does not include the space needed for selected-state and target emphasis, and for the selection cursor, because the emphasis and cursor space is automatically allocated by the value set control. The default space amount is 0.
- usVertItemSpacing (USHORT): Amount of vertical space allocated between each value set item, in pixels. This number does not include the space needed for selected-state and target emphasis, and for the selection cursor, because the emphasis and cursor space is automatically allocated by the value set control. The default space amount is 0.
- If the VMA_ITEMSIZE attribute is set, the following is returned:
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.