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)


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


// Print some text on the printer device




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.