Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

CopyItems

Copies a group of items to a new location.

C

int WINAPI SftTree_CopyItems(HWND hwndCtl, int from, int count, int to);
int WINAPI SftTreeSplit_CopyItems(HWND hwndCtl, int from, int count, int to);

C++

int CSftTree::CopyItems(int from, int count, int to);
int CSftTreeSplit::CopyItems(int from, int count, int to);

Parameters

hwndCtl

The window handle of the tree control.

from

The zero-based index of the first item to be copied.

count

The number of items to be copied.

to

The zero-based index of the location where the copied items are to be inserted. If to is -1, the items will be added at the end of the list.

Returns

The return value is the number of copied items or -1 if an error occurred.

Comments

The CopyItems function copies a group of items to a new location.

CopyItems copies all item attributes, including cell text, pictures, level, row header contents, etc. Also copied are the values set using SetItemData. If these values should remain unique in an application, they have to be explicitly changed after copying items.

The target item to cannot be inside the group of items to be copied.

Items can be moved using the MoveItems function.

In a tree control using a virtual data source, this function cannot be used and an error is returned.

See Also C/C++ API | Categories | Notifications