Help Center

CListView.GetGroupInfoByIndexmethod

Gets information on a specified group.

WindowsmethodCListView.incdocumented

Syntax

FUNCTION GetGroupInfoByIndex (BYVAL hListView AS HWND, BYVAL iIndex AS LONG, BYREF pgrp AS LVGROUP PTR) AS BOOLEAN
FUNCTION GetGroupInfoByIndex (BYVAL hListView AS HWND, BYVAL iIndex AS LONG, BYREF grp AS LVGROUP) AS BOOLEAN

Parameters

NameDescription
hListViewHandle to the ListView control.
iIndexThe index of the group.
pgrpA pointer to an LVGROUP structure to receive information on the group specified by iIndex. The calling application is responsible for allocating memory for the structure and any buffers in the structure, such as, the one pointed to by pszHeader. Set any contingent members of the structure, such as, cchHeader—the size of the buffer pointed to by pszHeader in characters, including the terminating NULL. Set cbSize to the size of LVGROUP in bytes. The message receiver is responsible for setting the structure members with information for the group specified by iIndex.

Return value

Returns the ID of the group if successful, or -1 otherwise.

Description

Gets information on a specified group

Remarks

Before attempting to retrieve the header for a group, first ensure that the group does not have the LBGS_NOHEADER style.

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

Reference

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