VM QUERYITEM
This message queries the contents of the item indicated by the values of the usRow and usColumn fields. The information returned is interpreted based on the attribute of the item.
Syntax
param1 USHORT usRow; /* Row index. */ USHORT usColumn; /* Column index. */ param2 PVSTEXT pvsText; /* Pointer to a VSTEXT data structure or NULL. */
Parameters
- usRow (USHORT) - input
- Row index of the item to be queried. Rows have a value from 1 to the value of the usRowCount field. This value, which is the total number of rows in the value set, is specified in the VSCDATA data structure when the value set control is created.
- usColumn (USHORT) - input
- Column index of the item to be queried. Columns have a value from 1 to the value of the usColumnCount field. This value, which is the total number of columns in the value set, is specified in the VSCDATA data structure when the value set control is created.
- pvsText (PVSTEXT) - input
- Pointer to a VSTEXT data structure or NULL. If the attribute of the item to query is VIA_TEXT, the value of the param2 parameter is the same as the value of the pvsText field. For all other attributes, the param2 parameter is reserved and should be set to a NULL value.
Returns
- ulItemId (ULONG) - returns
- Item information. This value depends on the VIA_* attribute specified for the value set item.
- VIA_TEXT Attribute Set:
- usTextLen (USHORT): Number of bytes copied to the buffer. This is the length of the text string, excluding the null termination character.
- VIA_BITMAP Attribute Set:
- hbmItem (HBITMAP): Handle of the bit map associated with the item indexed by the param1 parameter. If the item is empty, a NULL value is returned.
- VIA_ICON Attribute Set:
- hptItem (HPOINTER): Handle of the icon associated with the item indexed by the param1 parameter. If the item is empty, a NULL value is returned.
- VIA_RGB Attribute Set:
- rgbItem (ULONG): Color value associated with the item indexed by the param1 parameter. If the item is empty, a NULL value is returned. Each color value is a 4-byte integer with a value of:
- $\qquad$(R * 65536) + (G * 256) + B$
- where:
- R: Red intensity value
- G: Green intensity value
- B: Blue intensity value
- rgbItem (ULONG): Color value associated with the item indexed by the param1 parameter. If the item is empty, a NULL value is returned. Each color value is a 4-byte integer with a value of:
- VIA_COLORINDEX Attribute Set:
- ulColorIndex (ULONG): Index of the color associated with the item indexed by the param1 parameter.
- Error Condition:
- VSERR_INVALID_PARAMETERS: An error occurred. The WinGetLastError function may return the following errors:
- PMERR_INVALID_PARAMETERS
- PMERR_PARAMETER_OUT_OF_RANGE
- VSERR_INVALID_PARAMETERS: An error occurred. The WinGetLastError function may return the following errors:
Remarks
The application uses this message to query the contents of an individual value set item. When querying a text item, the application must provide a buffer for returning the text information. By specifying 0 as the value of the usBufLen field and then getting the value returned in the usTextLen parameter, an application can determine how large this buffer must be. The value returned is the length of the text string, excluding the null termination character.
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.