Jump to content

VM QUERYMETRICS

From EDM2
Revision as of 23:19, 14 April 2025 by Martini (talk | contribs) (Created page with "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== <pre> param1 USHORT fMetric; Control metric.: param2 ULONG ulReserved; Reserved value, should be 0.: </pre> ==Parameters== ;''fMetric'' (USHORT) - input: Control metric to be queried with this message. This can be either of the following: :VMA_ITE...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.

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.