CM SETCNRINFO
Appearance
This message sets or changes the data for the container control.
Syntax
param1 PCNRINFO pCnrInfo; /* Pointer to the CNRINFO structure from which to set the data for the container. */ param2 ULONG ulCnrInfoFl; /* Flags. */
Parameters
- pCnrInfo (PCNRINFO) - Input
- Pointer to the CNRINFO structure from which to set the data for the container.
- ulCnrInfoFl (ULONG) - Input
- Flags that show which fields are to be set.
- CMA_PSORTRECORD: Pointer to the comparison function for sorting container records. If NULL, which is the default condition, no sorting is performed. Sorting only occurs during record insertion and when changing the value of this field. The third parameter of the comparison function, pStorage, must be NULL. See CM_SORTRECORD for a further description of the comparison function.
- CMA_PFIELDINFOLAST: Pointer to the last column in the left window of the split details view. The default is NULL, causing all columns to be positioned in the left window.
- CMA_PFIELDINFOOBJECT: Pointer to a column that represents an object in the details view. This FIELDINFO structure must contain icons or bit maps. In-use emphasis is applied to this column of icons or bit maps only. The default is the leftmost column in the unsplit details view, or the leftmost column in the left window of the split details view.
- CMA_CNRTITLE: Text for the container title. The default is NULL.
- CMA_FLWINDOWATTR: Container window attributes.
- CMA_PTLORIGIN: Lower-left origin of the container window in virtual workspace coordinates, used in the icon view. The default origin is (0,0).
- CMA_DELTA: An application-defined threshold, or number of records, from either end of the list of available records. Used when a container needs to handle large amounts of data. The default is 0. Refer to the description of the container control in the OS/2 Programming Guide for more information about specifying deltas.
- CMA_SLBITMAPORICON: The size (in pels) of icons or bit maps. The default is the system size.
- CMA_SLTREEBITMAPORICON: The size (in pels) of the expanded and collapsed icons or bit maps in the tree icon and tree text views.
- CMA_TREEBITMAP: Expanded and collapsed bit maps in the tree icon and tree text views.
- CMA_TREEICON: Expanded and collapsed icons in the tree icon and tree text views.
- CMA_LINESPACING: The amount of vertical space (in pels) between the records. If this value is less than 0, a default value is used.
- CMA_CXTREEINDENT: Horizontal distance (in pels) between levels in the tree view. If this value is less than 0, a default value is used.
- CMA_CXTREELINE: Width of the lines (in pels) that show the relationship between items in the tree view. If this value is less than 0, a default value is used. Also, if the CA_TREELINE container attribute of the CNRINFO data structure's flWindowAttr field is not specified, these lines are not drawn.
- CMA_XVERTSPLITBAR: The initial position of the split bar relative to the container, used in the details view. If this value is less than 0, the split bar is not used. The default value is negative one (-1).
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE: Container data was successfully set.
- FALSE: Container data was not set. The WinGetLastError function may return the following errors:
- PMERR_INVALID_PARAMETERS
- PMERR_INSUFFICIENT_MEMORY.
Remarks
The data for a container is set from the buffer addressed by the pCnrInfo parameter. The flags in the ulCnrInfoFl parameter show which part or parts of the pCnrInfo parameter are set. The flag values can be combined by using a logical OR operator (|).
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.