导航:  Printer Wrapper Procedures >

AfxSetPrinterInfo

上一页返回章节概述下一页

描述

 

为指定打印机设置数据.

 

FreeBASIC 语法

 

FUNCTION AfxSetPrinterInfo ( _

  BYREF wszPrinterName AS WSTRING, _

  BYVAL dmField AS DWORD, _

  BYVAL nValue AS LONG _

) AS BOOLEAN

 

参数

 

wszPrinterName

 

打印机的名称.请注意,这是打印机的名称,而不是打印机驱动程序的名称.

 

dmField

 

DM_COLLATE

Specifies whether collation should be used when printing multiple copies: DMCOLLATE_TRUE or DMCOLLATE_FALSE.

DM_COPIES

Number of copies if the device supports multiple-page copies.

DM_ORIENTATION

The orientation of the paper: DMORIENT_PORTRAIT (1) or DMORIENT_LANDSCAPE (2).

DM_PAPERSIZE

The size of the paper to print on.

DM_PRINTQUALITY

The printer resolution: DMRES_HIGH, DMRES_MEDIUM, DMRES_LOW or DMRES_DRAFT.

DM_SCALE

The factor by which the printed output is to be scaled. The apparent page size is scaled from the physical page size by a factor of dmScale /100. For example, a letter-sized page with a dmScale value of 50 would contain as much data as a page of 17- by 22-inches because the output text and graphics would be half their original height and width.

DM_DEFAULTSOURCE

The paper source: DMBIN_AUTO, DMBIN_CASSETTE, DMBIN_ENVELOPE, DMBIN_ENVMANUAL, DMBIN_FIRST, DMBIN_FORMSOURCE, DMBIN_LARGECAPACITY, DMBIN_LARGEFMT, DMBIN_LAST, DMBIN_LOWER, DMBIN_MANUAL, DMBIN_MIDDLE, DMBIN_ONLYONE, DMBIN_TRACTOR, DMBIN_SMALLFMT or DMBIN_UPPER.

DM_PAPERLENGTH

The length of the paper.

DM_PAPERWIDTH

The width of the paper.

 

nValue

 

新价值.

 

返回值

 

成功或失败TRUE FALSE.

 

引用文件

 

AfxPrinter.inc