The wpCnrRemoveObject method should be called to remove an object from a container, if that object was inserted using either wpCnrInsertObject or wpclsInsertMultipleObjects. When the object is removed from a container, the USAGE_RECORD item, which was added to the in-use list when the object was inserted, will be removed. This method sends the CM_REMOVERECORD message to the container. The following shows the syntax of wpCnrRemoveObject:

#define INCL_WINWORKPLACE
#include <os2.h>

BOOL wpCnrRemoveObject (WPObject *self,
                        HWND hwndCnr,
                        PMINIRECORDCORE pRecord)

The self (WPObject *) parameter is the pointer to the object on which the method is being invoked. It points to an object of class WPObject.

The hwndCnr (HWND) parameter is the handle of the container control window.

The pRecord (PMINIRECORDCORE) parameter is the pointer to the record to be removed.

rc (BOOL) is returned with one of the following values: