LVM_INSERTGROUP message

Inserts a group into a list-view control.

Parameters

wParam

Index where the group is to be added. If this is -1, the group is added at the end of the list.

lParam

Pointer to a LVGROUP structure that contains the group to add.

Return value

Returns the index of the item that the group was added to, or -1 if the operation failed.

Remarks

To turn on group mode, call LVM_ENABLEGROUPVIEW or ListView_EnableGroupView.

A group cannot be inserted into an empty list-view control.

Be sure to set the iGroupId in the item(s) the group was added to. Otherwise after LVM_ENABLEGROUPVIEW message processing with TRUE the listview control will not show any items.

Note

To use this message, you must provide a manifest specifying Comclt32 version 6.0. For more information on manifests, see Enabling Visual Styles.

Requirements

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