fg_printer()

Win32 DirectX Fastgraph/Light

Prototype

int fg_printer (int message);

Function fg_printer (ByVal message As Long) As Long

function fg_printer (message : integer) : integer;

Description

The fg_printer() function issues a printer request. It works together with fg_vbprint() to print the contents of a virtual buffer. C++Builder and Delphi programs that select a printer through the Print dialog box should use the TPrinter methods Abort(), BeginDoc(), EndDoc(), and NewPage() in place of the functionality provided by fg_printer().

Parameters

message is a code specifying one of the following printer functions:

Symbol

Value

Meaning

ABORTDOC

2

Abort the current print job

ENDDOC

11

End a print job

NEWFRAME

1

Issue a page eject

STARTDOC

10

Start a print job

Return value

For STARTDOC requests, the return value will be one of the following:

0 = Success

-1 = No default printer is defined

-2 = The printer is off-line or otherwise unavailable

-3 = The printer does not support the STRETCHDIB function

-4 = A printer device context could not be created for the default printer

For all other requests, the return value will be zero.

Restrictions

none

See also

fg_printdc(), fg_vbprint()

Examples

Prdemo

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.