VM SETITEMATTR
Appearance
This message sets the attribute or attributes of the item indicated by the values of the usRow and usColumn parameters.
Syntax
param1 USHORT usRow; /* Row index. */ USHORT usColumn; /* Column index. */ param2 USHORT usItemAttr; /* Item attributes. */ USHORT fSet; /* Set or reset flag. */
Parameters
- usRow (USHORT) - input
- Row index of the value set item for which attributes are 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 attributes are 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.
- usItemAttr (USHORT) - input
- Attribute or attributes of the item to be set or reset based on the value of the fSet field. These attributes can be as follows:
- One of the following attributes can be set:
- VIA_BITMAP: If this attribute is set, the item is a bit map. This is the default.
- VIA_COLORINDEX: If this attribute is set, the item is an index into the logical color table.
- VIA_ICON: If this attribute is set, the item is an icon.
- VIA_RGB: If this attribute is set, the item is a color entry.
- VIA_TEXT: If this attribute is set, the item is a text string.
- In addition, one or more of the following attributes can be set:
- VIA_DISABLED: If this attribute is set, the item cannot be selected and is displayed with unavailable-state emphasis, if possible. Unavailable text items are always displayed with unavailable-state emphasis, according to CUA guidelines; for items displayed as color, bit maps, and icons, it is the application's responsibility to determine the best way to show that these items are unavailable, if possible. The selection cursor can be moved to an unavailable item by using either the keyboard navigation keys or a pointing device. This allows a user to press the F1 key to find out why that item cannot be selected.
- VIA_DRAGGABLE: If this attribute is set, the item can be the source of a direct manipulation action.
- VIA_DROPONABLE: If this attribute is set, the item can be the target of a direct manipulation action.
- VIA_OWNERDRAW: If this attribute is set, a paint notification message is sent whenever this item needs painting.
- fSet (USHORT) - input
- Set or reset flag.
- TRUE: Set the attribute of the indicated item.
- FALSE: Turn off the attribute of the indicated item.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE: Attribute or attributes were set successfully.
- 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 either set or reset a specific attribute or attributes of a value set item. This provides customization of a control at the item level, so that applications can provide their own types of items with a value set, as well as perform direct manipulation and other actions.
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.