PtrDevice:DeviceContext Access

<< Click to Display Table of Contents >>

Navigation:  RpPrinter & PtrDevice Class Overview > PtrDevice Class >

PtrDevice:DeviceContext Access

Previous pageReturn to chapter overviewNext page
Type        HDC                (16-bit: WORD,  32-bit: PTR)

Purpose

To retrieve the device context of the printer or print preview metafile context during a Print() or PrintPreview().

Example

// Print some text on the printer device

TextOut(oPtrDevice:DeviceContext,10,10,string2psz("Hello"),5)

 

Description

ReportPro uses metafile technology to produce the PrintPreview rather than a simple device context.  Some Windows API functions behave differently in a metafile device context and some do not work at all.  For more information, see the Windows API reference.

 

Note:        Do not destroy this device context.  It is automatically managed by the PtrDevice class.