CreateBMPFaxPageFromASCII

#include "BITIFF.H"

UINT CALLBACK CreateBMPFaxPageFromASCII( LPFAXTOASCII lpTextFormat,
                                                                                       UINT                   nMaxPages,
                                                                                       HANDLE far      *lpszPagesArray,
                                                                                       int far                   *lpErrorCode)

Description

This function is designed for fax applications to rasterize an ASCII page for faxing. It loads an ASCII text file into a device dependent bitmap or an array of bitmaps. The user can set the page width, length, margins, dot per inch resolution of the page. Also, the font characteristic like typeface, point size, bold, italic, tab stops and line spacing can be set. The measurements could be in 100 of an inch or in millimeters. The default is in inch. When text is loaded, the function will process Carriage Return CR and Line Feed LF. If text reaches the margin, a line feed will be inserted. So it will continue on next line. For details see appendix on LPFAXTOASCII data structure.

Parameters

LPFAXTOASCII

lpTextFormat

The data structure to format text.

UINT

nMaxPages

The maximum number of pages should be
generated.

HANDLE far

*lpszPagesArray

A pointer to an array bitmap handle for the
returned pages. The page array must have
nMaxPage elements and a NULL.

int far

*lpErrorCode

In case of an error, the returned error code.

Return values

The function will return the number of created pages on success and 0 on failure.

Programming notes

The user is responsible to free the bitmap GDI objects by calling the MS Windows SDK DeleteObject(). The image should have valid dot per inch resolution (DPI). The Image DPI will be used to scale the font size to get proportional view.

Requirements

Header :     Declared in BiTiff.h; include BiTiff.h.

Library :    Use BiTIFF.lib.

DLLs :       BiTiff.dll.