Share via


TV_SORTCB (Windows CE 5.0)

Send Feedback

This structure contains information used to sort child items in a tree view control. This structure is identical to the TVSORTCB structure, but was renamed to follow standard naming conventions.

typedef struct _TV_SORTCB { tvscbHTREEITEM hParent; PFNTVCOMPARE lpfnCompare; LPARAM lParam; } TV_SORTCB, FAR* LPTV_SORTCB; 

Members

  • hParent**
    Handle to the parent item.

  • lpfnCompare**
    Long pointer to an application-defined callback function, which is called during a sort operation each time the relative order of two list items needs to be compared. The callback function has the following form.

    int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2,
    LPARAM lParamSort); 
    

    The callback function must return a negative value if the first item should precede the second, a positive value if the first item should follow the second, or zero if the two items are equivalent.

    The lParam1 and lParam2 parameters of the callback function correspond to the lParam member of the TV_ITEM structure for the two items being compared. The lParamSort member corresponds to the lParam member of TV_SORTCB.

  • lParam**
    Application-defined 32-bit value that gets passed as the lParamSort parameter in the callback function specified in lpfnCompare.

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Commctrl.h.

See Also

TVM_SORTCHILDRENCB | TV_ITEM | TVSORTCB

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.