All objects which have information to display in details view must override this method.
The two possible queries are:
Query 1
A request for the CLASSFIELDINFO linked the list segment associated with an object. This information is needed just prior to changing the view of a container control to details view.
If pClassFieldInfo is NULL (no subclasses have appended details data), the number of columns of details information for this class and all its superclasses is returned. If pClassFieldInfo is NON-NULL, the number of columns of details informtion is returned and *pClassFieldInfo points to the head of a linked list of CLASSFIELDINFO structures to which a linked list of CLASSFIELDINFO structures describing the details fields of objects of this subclass should be appended.
For example,on input *pClassFieldInfo:
CLASSFIELDINFO_1_grandparent_ CLASSFIELDINFO_2_grandparent CLASSFIELDINFO_1_parent
on output, *pClassFieldInfo:
CLASSFIELDINFO_1_grandparent_ CLASSFIELDINFO_2_grandparent CLASSFIELDINFO_1_parent CLASSFIELDINFO_1_self
The correct way to handle this request is to do the following:
Note the following differences between the CLASSFIELDINFO and FIELDINFO structures:
For example, if an object has three fields:
typedef struct _SAMPLE_DETAIL_DATA { CDATE cdate; CTIME ctime; PSZ psz; } SAMPLE_DETAIL_DATA; classfieldinfo[0].offFieldData = FIELDOFFSET(SAMPLE,cdate); classfieldinfo[0].ulLenFieldData = FIELDOFFSET(SAMPLE,ctime) FIELDOFFSET(SAMPLE,cdate); classfieldinfo[1].offFieldData = FIELDOFFSET(SAMPLE,ctime); classfieldinfo[1].ulLenFieldData = FIELDOFFSET(SAMPLE,psz) - FIELDOFFSET(SAMPLE,ctime); classfieldinfo[2].offFieldData = FIELDOFFSET(SAMPLE,psz); classfieldinfo[2].ulLenFieldData = sizeof(SAMPLE) - FIELDOFFSET(SAMPLE,psz);
Note that *pClassFieldInfo must be modified to point to the beginning of the CLASSFIELDINFO linked list only if *pClassFieldInfo is 0.
The application must return the sum of the details columns of the parent and itself:
return(n_cols + n_parent_cols);
Note also that the fields MUST be set up sequentially. classfieldinfo[0] must point to data at an offset of 0. classfieldinfo[n] must point to data adjacent, and directly following that described by classfieldinfo[-1].
Query 2
The number of bytes of details data associated with an object. This information is needed prior to allocating memory for a container control insert record.
If pSize is NON-NULL, the override should adjust *pSize by the number of bytes which must be added to the end of a MINIRECORDCORE structure to hold the details information for objects of this class.
Example:
*pSize += bytes_of_details_data;
In the case of the above example,
*pSize += sizeof(SAMPLE_DETAIL_DATA);
Note: All class field pointers returned should be pointers to static data areas.