This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Description
Insert a new data item into a TreeView control.
Syntax
hItem = TreeView_InsertItem(hWnd, ctrlID, hParent, hAfter, Image, ImageSel, sText [, SetBold])
Returns
Number
If the operation is successful, the handle to the new data item is returned.
If the operation fails, the value zero is returned.
Parameters
Name |
Type |
Optional |
Meaning |
hWnd |
Number |
No |
Handle of the dialog containing the list-view control |
ctrlID |
Number |
No |
Control identifier assigned to the control during CONTROL ADD ... |
hParent |
Number |
Specifies the parent of this item, or zero if item is to be inserted at the root |
|
hAfter |
Number |
Specifies the handle of the item after which this new item is to be inserted. Use the following equates for special positions: %TVI_FIRST to insert new item at the beginning %TVI_LAST to insert new item at the end %TVI_SORT to insert new item in alphabetical order |
|
Image |
Number |
Number |
If an ImageList has been attached to the control, this parameters specify which image should be displayed (1=first, 2=second, etc.) for normal items.
If no image is needed, the value(s) 0 should be used. But if an ImageList is connected to the TreeView control 0 (zero) will in any case load first image of the ImageList. In this case, load as first image of the ImageList an empty image |
ImageSel |
Number |
Number |
If an ImageList has been attached to the control, this parameters specify which image should be used for selected items.
If no image is needed, the value(s) 0 should be used. But if an ImageList is connected to the TreeView control 0 (zero) will in any case load first image of the ImageList. In this case, load as first image of the ImageList an empty image |
sText |
String |
No |
The text string to insert into the control |
SetBold |
Number |
Yes |
If %TRUE, than items text is set to bold |
Remarks
Restrictions
See also
Examples