CwAddObjectToGroup

Syntax:

hGroup = CwAddObjectToGroup(hObject, hOldGroup)

        hGroup          (handle) The group to which the object has been
                        added.

        hObject         (handle) The object to add to the group.

        hOldGroup       (handle) The group to which the object is to be
                        added or the null handle.

Description:

This function adds an object to a group, creating the group if it does not yet exist. If the given group (hOldGroup) is a valid group, the given object (hObject) is added to it and a handle to it is returned. If the group parameter is the null handle, a new group is created, the provided object is added to it and the handle to the new group is returned.

Example:

/* Create a couple of objects and group them. */
obj1 = createSomeObject()
obj2 = createSomeObject()
gh = CwAddObjectToGroup(obj1, 0)
call CwAddObjectToGroup obj2, gh

Remarks:

Adding a group to itself is allowed but does nothing. However, it allows sloppy programming when using loops.

Functions by NAME

Index

Functions by PURPOSE