Help Center

CListView.InsertGroupmethod

Inserts a group into a list-view control.

WindowsmethodCListView.incdocumented

Syntax

FUNCTION InsertGroup (BYVAL hListView AS HWND, BYVAL index AS LONG, BYVAL pgrp AS LVGROUP PTR) AS LONG
FUNCTION InsertGroup (BYVAL hListView AS HWND, BYVAL index AS LONG, BYREF grp AS LVGROUP) AS LONG

Parameters

NameDescription
hListViewHandle to the ListView control.
indexIndex where the group is to be added. If this is -1, the group is added at the end of the list.
pgrpPointer to a LVGROUP structure that contains the group to add.
grpA 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.

Description

Inserts a group into a list-view control.

Remarks

To turn on group mode, call LVM_ENABLEGROUPVIEW or EnableGroupView.

To use InsertGroup, specify Comctl32.dll version 6 in the manifest.

Reference

  • Include file CListView.inc
  • Defined in AfxNova/CListView.inc:1249
  • Documented in Windows/WIndows Controls/CListView Class.md
  • Topic: CListView Class