PFNLVGROUPCOMPARE callback function (commctrl.h)

The LVGroupCompare function is an application-defined callback function used with the LVM_INSERTGROUPSORTED and LVM_SORTGROUPS messages. It defines the ordering of the groups, based on the ID. The LVGROUPCOMPARE type defines a pointer to this callback function. LVGroupCompare is a placeholder for the application-defined function name.

Syntax

PFNLVGROUPCOMPARE Pfnlvgroupcompare;

int Pfnlvgroupcompare(
  int unnamedParam1,
  int unnamedParam2,
  void *unnamedParam3
)
{...}

Parameters

unnamedParam1

Type: INT

The ID of the first group.

unnamedParam2

Type: INT

The ID of the second group.

unnamedParam3

Type: VOID*

A pointer to the application-defined information. This comes from the message that was called; for LVM_INSERTGROUPSORTED it is LVINSERTGROUPSORTED.pvData, and for LVM_SORTGROUPS it is the plv parameter.

Return value

Type: INT

Returns a negative value if the data for Group1_ID is less than the data for Group2_ID, a positive value if it is greater, or zero if it is the same.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header commctrl.h

See also

LVINSERTGROUPSORTED

LVM_INSERTGROUPSORTED

LVM_SORTGROUPS