PtrDevice:Init() Method

<< Click to Display Table of Contents >>

Navigation:  RpPrinter & PtrDevice Class Overview > PtrDevice Class >

PtrDevice:Init() Method

Previous pageReturn to chapter overviewNext page

Purpose

To create a printer device object.

Syntax

PtrDevice{oWindowOwner, oReport} SELF

 

Init(oWindowOwner, oReport) SELF

Arguments

oWindowOwnerThe window which will own the PrintPreview and PrintMsg dialog windows.

 

oReportThe object that has the callback methods used to create the report or printed output (this can be the same as oWindowOwner).

Description

The PtrDevice object is initialized by retrieving the default Windows printer.  You should check the IsValid access of the returned object to make sure the PtrDevice object was able to initialize correctly.

Example

// Instantiate a PtrDevice object

oPtrDevice := PtrDevice{oMyWindow, oReport1}