Class field information data structure for use with the wpclsQueryDetailsInfo method.
typedef struct _CLASSFIELDINFO {
ULONG cb; /* Size of the CLASSFIELDINFO structure. */
ULONG flData; /* Attributes of the field's data. */
ULONG flTitle; /* Attributes of the field's title. */
PVOID pTitleData; /* Title data. */
ULONG ulReserved; /* Reserved. */
PVOID pUserData; /* Pointer to user data. */
struct _CLASSFIELDINFO *pNextFieldInfo; /* Pointer to the next linked CLASSFIELDINFO structure. */
ULONG cxWidth; /* Width of the field in pels. */
ULONG offFieldData; /* Offset from beginning of this class's data for this field. */
ULONG ulLenFieldData; /* Width of data in bytes. */
PFNOWNDRW pfnOwnerDraw; /* Ownerdraw procedure for Details View column. */
ULONG flCompare; /* Flags. */
PFNCOMPARE pfnCompare; /* Pointer to a comparison function. */
ULONG DefaultComparison; /* Default comparison operator in the Include Page Criteria dialog box (in the Settings notebook). */
ULONG ulLenCompareValue; /* Maximum length of the compare data. */
PVOID pDefCompareValue; /* The default value to be used for comparisons. */
PVOID pMinCompareValue; /* The default value to be used for comparisons. */
PVOID pMaxCompareValue; /* The default value to be used for comparisons. */
PSZ pszEditControlClass; /* Window class to be used to edit the compare value. */
PFNCOMPARE pfnSort; /* Sort function for this field. */
PSZ pNewComp; /* Pointer to an array of strings containing a description of a comparison type. */
} CLASSFIELDINFO;
typedef CLASSFIELDINFO * PCLASSFIELDINFO ;
The CLASSFIELDINFO data structure is similar to the FIELDINFO data structure of the container control, with the following differences:
As an example of the use of these two fields, if an application has the following details data:
typedef struct _SAMPLE {
CDATE cdate;
CTIME ctime;
PSZ psz;
} SAMPLE;
then
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);
/* FIELDOFFSET is a macro that calculates the byte offset of a field *
* within a structure. */
Note: It is essential that the fields be linked in the order shown above-cdate must be followed by ctime, and finally psz.