CwGetParent

Syntax:

hParent = CwGetParent(hObject)

        hParent         (handle) The parent of hObject.

        hObject         (handle) The object to examine.

Description:

This function returns the parent of an object. The parent is defined as the thing containing the object. Currently, it may be either a view or a group. If the object referenced by "hObject" is in a group, the group handle is returned. Otherwise, the handle of the containing view is returned.

This function is useful for determining if an object is in a group.

Example:

/* Function to determine whether the given object is in a
   group or not. */

inGroup:procedure
parse arg handle

h=CwGetParent(handle)
if CwGetHandleType(h) = "View" then
        r = 0
else
        r = 1
return r


Functions by NAME

Index

Functions by PURPOSE