Export (0) Print
Expand All

TVINSERTSTRUCT structure

Contains information used to add a new item to a tree-view control. This structure is used with the TVM_INSERTITEM message. The structure is identical to the TV_INSERTSTRUCT structure, but it has been renamed to follow current naming conventions.

Syntax


typedef struct {
  HTREEITEM hParent;
  HTREEITEM hInsertAfter;
#if (_WIN32_IE >= 0x0400)
  union {
    TVITEMEX itemex;
    TVITEM   item;
  } DUMMYUNIONNAME;
#else 
  TVITEM    item;
#endif 
} TVINSERTSTRUCT, *LPTVINSERTSTRUCT;

Members

hParent

Type: HTREEITEM

Handle to the parent item. If this member is the TVI_ROOT value or NULL, the item is inserted at the root of the tree-view control.

hInsertAfter

Type: HTREEITEM

Handle to the item after which the new item is to be inserted, or one of the following values:

ValueMeaning
TVI_FIRST

Inserts the item at the beginning of the list.

TVI_LAST

Inserts the item at the end of the list.

TVI_ROOT

Add the item as a root item.

TVI_SORT

Inserts the item into the list in alphabetical order.

 

DUMMYUNIONNAME
itemex

Type: TVITEMEX

Version 4.71. TVITEMEX structure that contains information about the item to add.

item

Type: TVITEM

TVITEM structure that contains information about the item to add.

item

Type: TVITEM

TVITEM structure that contains information about the item to add.

Remarks

The unions in this structure have been updated to work with compilers that do not support nameless unions. If your compiler does not support nameless unions, define the NONAMELESSUNION token before including the commctrl.h header file.

Important  Using TVI_LAST to insert an item into a tree-view node that already contains a large number of items can take a long time, causing the application to stop responding until the insert operation completes.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Commctrl.h

Unicode and ANSI names

TVINSERTSTRUCTW (Unicode) and TVINSERTSTRUCTA (ANSI)

 

 

Community Additions

ADD
Show:
© 2014 Microsoft