Export (0) Print
Expand All
Expand Minimize

ListView_InsertItem (Windows CE 5.0)

Windows CE 5.0
Send Feedback

This macro inserts a new item in a list-view control. You can use this macro or send the LVM_INSERTITEM message explicitly.

int ListView_InsertItem( 
  HWND hwnd, 
  const LVITEM FAR* pitem 
);

Parameters

hwnd
Handle to the list-view control.
pitem
Pointer to an LVITEM structure that specifies the attributes of the list-view item. The iItem member of the structure specifies the index of the new item.

You cannot use ListView_InsertItem or LVM_INSERTITEM to insert subitems; the iSubItem member of the LVITEM structure must be zero.

Return Values

The index of the new item indicates success. -1 indicates failure.

Remarks

If a list-view control has either the LVS_SORTASCENDING or LVS_SORTDESCENDING window style, an LVM_INNSETITEM message will fail if you try to insert an item that has LPSTR_TEXTCALLBACK as the pszText member of its LVITEM structure.

Related message: LVM_INSERTITEM

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Commctrl.h.

See Also

LVM_INSERTITEM | List-View Controls Macros


Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.


Show:
© 2014 Microsoft