The wpRegisterView method should be called whenever a new view of an object is created. Registering a view will set the title of the frame window to the object's title and add the view title as the current view in the window list. The wpRegisterView method is used to allow an object to register a new open view. The following shows the syntax of wpRegisterView:

#define INCL_WINWORKPLACE
#include <os2.h>

BOOL wpRegisterView (WPObject *self, HWND hwndFrame, PSZ pszViewTitle)

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 hwndFrame (HWND) parameter is the handle of the frame window containing the new view.

The pszViewTitle (PSZ) parameter is the pointer to a string containing the name of the view.

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