CwFindNextObject

Syntax:

hObj = CwFindNextObject(hLastObj)

        hLastObj        (handle) Handle to an object

        hObj            (handle) Handle to an object

Description:

This function is used to list all of the objects in the current view. It does this by returning the object next in line after the one referenced by "hLastObj". The object that is next in line is (more or less) the object behind "hLastObj".

A program can cycle through all of the objects in the current view by repeatedly calling CwFindNextObject with the handle returned in the previous call as the argument. The sequence of objects visited when calling CwFindNextObject in this manner is the same as the sequence of objects selected when using the page-down key.

This function behaves identically to CwFindPreviousObject except that the order in which objects are cycled through is reversed.

Example:

/* Do something to all objects in the current view. */
o = CwFindFirstObject(CwGetCurrentView())
do while CwIsHandleValid(o)
        call doSomethingTo o
        o = CwFindNextObject(o)
        end

Remarks:

When the end of the sequence (i.e. the last object) is reached, the null-handle is returned on the next call.

Passing a null handle is equivalent to CwFindFirstObject with the currently selected view.



Functions by NAME

Index

Functions by PURPOSE