LVGROUP structure (commctrl.h)

Used to set and retrieve groups.

Syntax

typedef struct tagLVGROUP {
  UINT   cbSize;
  UINT   mask;
  LPWSTR pszHeader;
  int    cchHeader;
  LPWSTR pszFooter;
  int    cchFooter;
  int    iGroupId;
  UINT   stateMask;
  UINT   state;
  UINT   uAlign;
  LPWSTR pszSubtitle;
  UINT   cchSubtitle;
  LPWSTR pszTask;
  UINT   cchTask;
  LPWSTR pszDescriptionTop;
  UINT   cchDescriptionTop;
  LPWSTR pszDescriptionBottom;
  UINT   cchDescriptionBottom;
  int    iTitleImage;
  int    iExtendedImage;
  int    iFirstItem;
  UINT   cItems;
  LPWSTR pszSubsetTitle;
  UINT   cchSubsetTitle;
} LVGROUP, *PLVGROUP;

Members

cbSize

Type: UINT

Size of this structure, in bytes.

mask

Type: UINT

Mask that specifies which members of the structure are valid input. One or more of the following values:

Value Meaning
LVGF_NONE
No other items are valid.
LVGF_HEADER
pszHeader and cchHeader members are valid.
LVGF_FOOTER
pszFooter and cchFooter members are valid.
LVGF_STATE
state and stateMask members are valid.
LVGF_ALIGN
uAlign member is valid.
LVGF_GROUPID
iGroupId member is valid.
LVGF_SUBTITLE

Version 6.00 and later. The pszSubtitle member is valid.

LVGF_TASK

Version 6.00 and later. The pszTask member is valid.

LVGF_DESCRIPTIONTOP

Version 6.00 and later. The pszDescriptionTop member is valid.

LVGF_DESCRIPTIONBOTTOM

Version 6.00 and later. The pszDescriptionBottom member is valid.

LVGF_TITLEIMAGE

Version 6.00 and later. The iTitleImage member is valid.

LVGF_EXTENDEDIMAGE

Version 6.00 and later. The iExtendedImage member is valid.

LVGF_ITEMS

Version 6.00 and later. The cItems member is valid.

LVGF_SUBSET

Version 6.00 and later. The pszSubsetTitle member is valid.

LVGF_SUBSETITEMS

Version 6.00 and later. The cchSubsetTitle member is valid.

pszHeader

Type: LPWSTR

Pointer to a null-terminated string that contains the header text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the header text.

cchHeader

Type: int

Size in TCHARs of the buffer pointed to by the pszHeader member. If the structure is not receiving information about a group, this member is ignored.

pszFooter

Type: LPWSTR

Pointer to a null-terminated string that contains the footer text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the footer text.

cchFooter

Type: int

Size in TCHARs of the buffer pointed to by the pszFooter member. If the structure is not receiving information about a group, this member is ignored.

iGroupId

Type: int

ID of the group.

stateMask

Type: UINT

Mask used with LVM_GETGROUPINFO and LVM_SETGROUPINFO to specify which flags in the state value are being retrieved or set.

state

Type: UINT

Flag that can have one of the following values:

Value Meaning
LVGS_NORMAL
Groups are expanded, the group name is displayed, and all items in the group are displayed.
LVGS_COLLAPSED
The group is collapsed.
LVGS_HIDDEN
The group is hidden.
LVGS_NOHEADER

Version 6.00 and later. The group does not display a header.

LVGS_COLLAPSIBLE

Version 6.00 and later. The group can be collapsed.

LVGS_FOCUSED

Version 6.00 and later. The group has keyboard focus.

LVGS_SELECTED

Version 6.00 and later. The group is selected.

LVGS_SUBSETED

Version 6.00 and later. The group displays only a portion of its items.

LVGS_SUBSETLINKFOCUSED

Version 6.00 and later. The subset link of the group has keyboard focus.

uAlign

Type: UINT

Indicates the alignment of the header or footer text for the group. It can have one or more of the following values. Use one of the header flags. Footer flags are optional.

Value Meaning
LVGA_FOOTER_CENTER
Footer text is centered horizontally in the window.
LVGA_FOOTER_LEFT
Footer text is aligned at the left of the window.
LVGA_FOOTER_RIGHT
Footer text is aligned at the right of the window.
LVGA_HEADER_CENTER
Header text is centered horizontally in the window.
LVGA_HEADER_LEFT
Header text is aligned at the left of the window.
LVGA_HEADER_RIGHT
Header text is aligned at the right of the window.

pszSubtitle

Type: LPWSTR

Pointer to a null-terminated string that contains the subtitle text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the subtitle text. This element is drawn under the header text.

cchSubtitle

Type: UINT

Size, in TCHARs, of the buffer pointed to by the pszSubtitle member. If the structure is not receiving information about a group, this member is ignored.

pszTask

Type: LPWSTR

Pointer to a null-terminated string that contains the text for a task link when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the task text. This item is drawn right-aligned opposite the header text. When clicked by the user, the task link generates an LVN_LINKCLICK notification.

cchTask

Type: UINT

Size in TCHARs of the buffer pointed to by the pszTask member. If the structure is not receiving information about a group, this member is ignored.

pszDescriptionTop

Type: LPWSTR

Pointer to a null-terminated string that contains the top description text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the top description text. This item is drawn opposite the title image when there is a title image, no extended image, and uAlign==LVGA_HEADER_CENTER.

cchDescriptionTop

Type: UINT

Size in TCHARs of the buffer pointed to by the pszDescriptionTop member. If the structure is not receiving information about a group, this member is ignored.

pszDescriptionBottom

Type: LPWSTR

Pointer to a null-terminated string that contains the bottom description text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the bottom description text. This item is drawn under the top description text when there is a title image, no extended image, and uAlign==LVGA_HEADER_CENTER.

cchDescriptionBottom

Type: UINT

Size in TCHARs of the buffer pointed to by the pszDescriptionBottom member. If the structure is not receiving information about a group, this member is ignored.

iTitleImage

Type: int

Index of the title image in the control imagelist.

iExtendedImage

Type: int

Index of the extended image in the control imagelist.

iFirstItem

Type: int

Read-only.

cItems

Type: UINT

Read-only in non-owner data mode.

pszSubsetTitle

Type: LPWSTR

NULL if group is not a subset. Pointer to a null-terminated string that contains the subset title text when item information is being set. If group information is being retrieved, this member specifies the address of the buffer that receives the subset title text.

cchSubsetTitle

Type: UINT

Size in TCHARs of the buffer pointed to by the pszSubsetTitle member. If the structure is not receiving information about a group, this member is ignored.

Remarks

All strings returned in this structure should be treated as read-only.

The creation of subsets is not currently supported, and pszSubsetTitle cannot be set by applications.

Requirements

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