ListView_InsertGroup macro (commctrl.h)

Inserts a group into a list-view control. You can use this macro or send the LVM_INSERTGROUP message explicitly.

Syntax

int ListView_InsertGroup(
   HWND     hwnd,
   int      index,
   PLVGROUP pgrp
);

Parameters

hwnd

Type: HWND

A handle to the list-view control.

index

Type: int

pgrp

Type: PLVGROUP

LVGROUP

Return value

Type: int

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.

To use ListView_InsertGroup, specify Comctl32.dll version 6 in the manifest. 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]
Target Platform Windows
Header commctrl.h