Export (0) Print
Expand All
Expand Minimize

ListView_GetItem macro

Gets some or all of a list-view item's attributes. You can use this macro or send the LVM_GETITEM message explicitly.

Syntax


BOOL ListView_GetItem(
  HWND hwnd,
  LPLVITEM pitem
);

Parameters

hwnd

Type: HWND

A handle to the list-view control.

pitem

Type: LPLVITEM

A pointer to an LVITEM structure that specifies the information to retrieve and receives information about the list-view item.

Return value

Returns TRUE if successful, or FALSE otherwise.

Remarks

When the LVM_GETITEM message is sent, the iItem and iSubItem members identify the item or subitem to retrieve information about and the mask member specifies which attributes to retrieve. For a list of possible values, see the description of the LVITEM structure.

If the LVIF_TEXT flag is set in the mask member of the LVITEM structure, the pszText member must point to a valid buffer and the cchTextMax member must be set to the number of characters in that buffer. Applications should not assume that the text will necessarily be placed in the specified buffer. The control may instead change the pszText member of the structure to point to the new text rather than place it in the buffer.

If the mask member specifies the LVIF_STATE value, the stateMask member must specify the item state bits to retrieve. On output, the state member contains the values of the specified state bits.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Commctrl.h

 

 

Community Additions

ADD
Show:
© 2014 Microsoft