TVINSERTSTRUCTW structure (commctrl.h)
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.
typedef struct tagTVINSERTSTRUCTW {
HTREEITEM hParent;
HTREEITEM hInsertAfter;
union {
TVITEMEXW itemex;
TV_ITEMW item;
} DUMMYUNIONNAME;
} TVINSERTSTRUCTW, *LPTVINSERTSTRUCTW;
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:
DUMMYUNIONNAME
DUMMYUNIONNAME.itemex
Type: TVITEMEX
Version 4.71. TVITEMEX structure that contains information about the item to add.
DUMMYUNIONNAME.item
Type: TVITEM
TVITEM structure that contains information about the item to add.
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.
Note
The commctrl.h header defines TVINSERTSTRUCT as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Header | commctrl.h |