Jump to content

VM SETITEM

From EDM2

This message specifies the type of information that will be contained by a value set item. This item is indicated by the values of the usRow and usColumn fields. Each value set item can contain a different type of information. The value set interprets the information set for the item based on the attribute of the item. Value set items that are not set (blank items) are drawn using the background color of the value set.

Syntax

param1
    USHORT usRow;    /* Row index. */
    USHORT usColumn; /* Column index. */

param2
    ULONG  ulItemId; /* Item information. */

Parameters

usRow (USHORT) - input
Row index of the value set item for which information is being specified. 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 value set item for which information is being specified. 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.
ulItemId (ULONG) - input
Item information. This value depends on the VIA_* attribute set for the item.
If the VIA_TEXT attribute is specified, the ulItemId field is as follows:
pszItem (PSZ): Pointer to a null terminated string containing the text to be placed in the item. If NULL is passed in, the item is blank.
If the VIA_BITMAP attribute is specified, the ulItemId field is as follows:
hbmItem (HBITMAP): Handle to a bit map that is to be drawn in the item indicated by the param1 parameter. If NULLHANDLE is passed in, the item will be blank.
If the VIA_ICON attribute is specified, the ulItemId field is as follows:
hptItem (HPOINTER): Handle to the icon that is to be drawn in the item indicated by the param1 parameter. If NULLHANDLE is passed in, the item is blank.
If the VIA_RGB attribute is specified, the ulItemId field is as follows:
rgbItem (ULONG): Color value to be drawn in the item indicated by the param1 parameter. If an invalid value is passed in (a value greater than 0x00FFFFFF), the item is blank. Each color value is a 4-byte integer with a value of:
$(R * 65536) + (G * 256) + B$
where:
R: Red intensity value
G: Green intensity value
B: Blue intensity value
If the VIA_COLORINDEX attribute is specified, the ulItemId field is as follows:
ulColorIndex (ULONG): Index of the color in the logical color table to be drawn in the item indicated by the param1 parameter.

Returns

rc (BOOL) - returns
Success indicator.
TRUE: Item was successfully set.
FALSE: An error occurred. The WinGetLastError function may return the following errors:
PMERR_INVALID_PARAMETERS
PMERR_PARAMETER_OUT_OF_RANGE

Remarks

The application uses this message to set the contents of an individual value set item. To set the values for the entire value set, an application would loop through the rows and columns, setting the value of each item during the initial value set window processing before the window becomes visible.

Default Processing

The default window procedure does not expect to receive this message and therefore takes no action on it other than to return FALSE.