LlPrintWithBoxStart

Syntax:

INT LlPrintWithBoxStart (HLLJOB hJob, UINT nObjType, LPCTSTR lpszObjName, INT nPrintOptions, INT nBoxType, HWND hWnd, LPCTSTR lpszTitle);

Task:

Starts the print job and opens the project file. Supports an abort window. If you use a data provider as data source, several project files can be passed here semicolon-separated. Then a combination print is performed and the outputs of the individual projects are summarized as total output. You can react to the callback LL_NTFY_COMBINATIONPRINTSTEP.

Parameter:

hJob: Job handle

nObjType: LL_PROJECT_LABEL, LL_PROJECT_LIST or LL_PROJECT_CARD

lpszObjName: The file name of the project with file extension.

For combination printing with a semicolon-separated list, you can also provide your own information for the LL_NTFY_COMBINATIONPRINTSTEP callback using the syntax "JOB=...". In addition to "JOB=", the identifiers "TOC=" (Table of Contents), "IDX=" (Index) and "GTC=" (Reverse Side) are also available. Example: "C:\temp\cover.lst;JOB=MyValue;C:\temp\report.lst"

nPrintOptions:

Value

Meaning

LL_­PRINT_­NORMAL

output to printer

LL_­PRINT_­PREVIEW

output to preview

LL_­PRINT_­FILE

output to file

LL_­PRINT_EXPORT

output to an export module that can be defined with LlPrintSetOption­String(LL_­PRN­OPT­STR_EXPORT)

 

Optionally combined with one of the following flags:

Value

Meaning

LL_PRINT_MULTIPLE_JOBS

output in several smaller print jobs (see below) with network spooler print.

LL_PRINT_REMOVE_-UNUSED_VARS

Fields and variables not required by the project are removed from the internal buffer after printing starts. This can speed up following declarations considerably. The recommended practice however is to query the required data using LlGetUsedIdentifiers() which is the better alternative.

 

These options influence LL_OPTIONSTR_EXPORTS_ALLOWED.

nBoxType:

Value

Meaning

LL_­BOXTYPE_­NORMALMETER

Abort box with bar meter and text

 

LL_­BOXTYPE_­BRIDGEMETER

Abort box with bridge meter and text

LL_­BOXTYPE_­EMPTYABORT

Abort box with text

LL_­BOXTYPE_­NORMALWAIT

Box with bar meter and text, no abort button

LL_­BOXTYPE_­BRIDGEWAIT

Box with bridge meter and text, no abort button

LL_­BOXTYPE_­EMPTYWAIT

Box with text, no abort button

LL_BOXTYPE_STDABORT

Abort box with system bar meter

LL_BOXTYPE_STDWAIT

Box with bar meter, no abort button

LL_­BOXTYPE_­NONE

No box.

 

Note that the Boxtype parameter is only listed here for compatibility with older operating systems. By default, the standard progress bar of the operating system is used.

hWnd: Window handle of the calling program (used as parent of the dialog box)

lpszTitle: Title of the abort dialog box, also appears as text in the print manager

Return Value:

Error code

Hints:

Please check the return value!

An application modal abort dialog box is shown as soon as the print starts. Its title is defined by the passed parameter. In the dialog box there is a percentage-meter-control and a two-line static text, both of which can be set using LlPrintSetBoxText() to show the user the print progress, and also an abort button if required (see below).

Example:

HLLJOB   hJob;
hJob = LlJobOpen(0);

if (LlPrintWithBoxStart(hJob, LL_PROJECT_LABEL, "test.lbl",
      LL_PRINT_NORMAL, LL_BOXTYPE_NORMALMETER, hWnd, "print") == 0)
{
   LlPrintSetBoxText(hJob, "There we go", 0);
   <... etc...>
   LlPrintEnd(hJob, 0);
}
else
   MessageBox(NULL, "error", "List & Label", MB_OK);
LlJobClose(hJob);

See also:

LlPrintStart, LlPrintEnd