To support printing the contents of an object from the Desktop-by using the object's pop-up menus or dragging the object and dropping it on the printer object-the object's class definition must override wpPrintObject inherited from its parent class.

The new class is created as a subclass of an existing class. For example, if the object is to be a data file, the WPDataFile class would be used as the parent class. In the class definition file, the new class overrides wpPrintObject that it inherits from its parent class. The new class' version of wpPrintObject contains the code that prints the contents of the object.

Note: It is recommended that the code in the object's version of wpPrintObject should start on a separate thread to execute the code that actually prints the contents of the object. By doing this, the control can be returned to the Workplace Shell and the user immediately. Supporting code, such as dialog windows, should be done on a separate thread as well.