windows_programming_notes.nbk: Home | Index | Next Page: ListView_SortItems | Previous Page: ListView_GetEditControl


 ListView_GetItem

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

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.

Macro Information


windows_programming_notes.nbk: Home | Index | Next Page: ListView_SortItems | Previous Page: ListView_GetEditControl


Notebook exported on Monday, 7 July 2008, 18:56:50 PM Eastern Daylight Time