The wpCnrInsertObject method inserts a record into a container control window. The following shows the syntax of wpCnrInsertObject:

#define INCL_WINWORKPLACE
#include <os2.h>

PMINIRECORDCORE wpCnrInsertObject (WPObject *self,
                                   HWND hwndCnr,
                                   PPOINTL pIcon,
                                   PMINIRECORDCORE pParent,
                                   PRECORDINSERT pRecInsert)

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 pIcon (PPOINTL) parameter is the pointer to a POINTL structure specifying the initial icon position in the container control window.

The pParent (PMINIRECORDCORE) parameter is the pointer to the parent record. The pParent parameter specifies the record of the immediate parent of the record being inserted. This parameter should be set to NULL, if the record has no parent or if the Tree view is not supported.

The pRecInsert (PRECORDINSERT) parameter is the pointer to the RECORDINSERT structure specifying how this record is to be inserted relative to other records in the same container. The possible values of this parameter are: